Telerik Forums
UI for WPF Forum
1 answer
62 views

Hi,

I need to add bullets to a TableCell from code. I have tried cell.Blocks.Add(bullets) where bullets is a DocumentList but I am getting 'cannot convert from DocumentList to Block.

Code snippet:


                            DocumentList bullets = new DocumentList(DefaultListStyles.Bulleted, document);
                            p1 = new Paragraph();
                            s1 = new Span();
                            cell1.Background = Color.FromRgb(255, 255, 255);
                            cell1.PreferredWidth = w1;
                            cell1.Padding = new Telerik.Windows.Documents.Layout.Padding(3, 6, 3, 6);
                            s1.FontFamily = new FontFamily(CGlobals.docu_default_font);
                            s1.FontSize = Unit.PointToDip(CGlobals.docu_default_font_size);
                            s1.Text = name;
                            p1.Inlines.Add(s1);
                            bullets.AddParagraph(p1);
                            cell1.Blocks.Add(bullets);

Thank you

Steve
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 06 Sep 2024
1 answer
170 views

Hi,

When a user uses a filter on the RadgridView and then clicks a button to reload different data in the grid the filters are still there. Is there a way to clear these automatically when reloading data?

<telerik:RadGridView
                      ItemsSource="{Binding Data}"
                      CanUserInsertRows="False" />
Martin Ivanov
Telerik team
 answered on 05 Sep 2024
1 answer
69 views

Hi,

I would like to retrieve the VisibleRangeStart and VisibleRangeEnd properties after a VisibleRangeChanged event occurs.

How can I do that in mvvm?

I can track the changed event with:

<telerik:EventToCommandBehavior.EventBindings>
    <telerik:EventBinding Command="{Binding CustomCommand}" EventName="VisibleRangeChanged" />
</telerik:EventToCommandBehavior.EventBindings>

Thanks in advance,
Egbert

Stenly
Telerik team
 answered on 04 Sep 2024
0 answers
49 views

A couple of questions regarding DocumentVariableFields:

1. Is it possible to make a field read only, i.e. the field cannot be deleted from the UI.

I'm inserting the field into a table cell:

            RadDocumentEditor editor = new RadDocumentEditor(document);
            var cell = document.EnumerateChildrenOfType<TableCell>().ToList()[0];

            if (cell != null)
            {
                DocumentPosition position = new DocumentPosition(document);
                position.MoveToDocumentElementStart(cell.Blocks.First());
                document.CaretPosition.MoveToPosition(position);
                DocumentVariableField docVariable = new DocumentVariableField() { VariableName = "2000" };
                editor.InsertField(docVariable);
            }
            doc_text.Document = document;

            doc_text.Document.DocumentVariables["2000"] = "Date";
            //doc_text.Document.DocumentVariables["2002"] = " ";
            var field = doc_text.Document.EnumerateChildrenOfType<FieldRangeStart>().Where(x => x.Field.FieldTypeName == "DOCVARIABLE"
            && ((DocumentVariableField)x.Field).VariableName == "2000").FirstOrDefault();

            if (field != null)
            {
                doc_text.UpdateField(field);
            }

2. Is it possible to 'attach' a click event handler to a field, or a table cell?

 

Thank you

Steve
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 03 Sep 2024
1 answer
69 views
Can you please help me to Download Diagram in .svg file.
Martin Ivanov
Telerik team
 answered on 03 Sep 2024
1 answer
79 views

We were using a standard Window object as the parent for our MainWindow. All was good. Then we wanted to do theming...couldn't do it easily, we found we needed to change to telerik:RadWindow. That's when everything went.....bad. No more window icons, no more task bar icon, no more showing up in taskbar. We've been able to figure out msot things and add more code to "fix" what we thought should be part of the default behaviour.

Then this morning my boss uses the mouse to try to change a value in a RadComboBox.....nope. Huh? I must have done something wrong? I don't think so. The change is in git and linked to the exact date we changed from Window to RadWindow..

How are you supposed to get mouse selections to work with a RadComboBox contained in a RadWindow?

Peter
Top achievements
Rank 1
Iron
Iron
 answered on 28 Aug 2024
1 answer
131 views

Hi Team,

We are using RadStepProgressBar in our project, and we would like to change the selected color from Yellow to Blue. However, we have not been able to find a solution.

Here is the current XAML code:

<telerik:RadStepProgressBar  
    Background="AliceBlue"
    VerticalAlignment="Top" 
    x:Name="stepProgressBar" 
    Grid.Row="0" 
    TrackFill="LightGreen" 
    SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}"
    ItemsSource="{Binding OrderSteps}" 
    DisplayMemberPath="Name" 
    AnimationDuration="0.6"
    Margin="0 0 0 0">
    <telerik:RadStepProgressBar.ItemContainerStyle>
        <Style TargetType="telerik:RadStepProgressBarItem">
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
            <Setter Property="TextBlock.Foreground" Value="White" />
            <Setter Property="ShapeStroke" Value="Black" />
            <Setter Property="Background" Value="DarkSlateGray" />
            <Setter Property="TextBlock.TextAlignment" Value="Center" />
        </Style>
    </telerik:RadStepProgressBar.ItemContainerStyle>
</telerik:RadStepProgressBar>

 

Could you please assist us in changing the selected color to Blue?

Thank you.

Stenly
Telerik team
 answered on 27 Aug 2024
0 answers
77 views

This code behind does not work for importing files that are read only access. No error pops up, just a blank spreadsheet opens up

using (Stream input = new FileStream(this.ExcelDocumentSource, FileMode.Open, FileAccess.Read))
{
    this.Workbook = new XlsxFormatProvider().Import(input);
    //this.Workbook.Protect("telerik");
}

 

Thanks,

Patrick
Top achievements
Rank 1
 asked on 26 Aug 2024
0 answers
80 views

Hello,

I'm wondering if there is a way to set a fixed height to the bars in a barseries. For example, instead of the bars changing height in the following example, I'd like them to stay up with a fixed height.

 

 

 

The desired outcome would look something like this:

The xaml I used fort the example is this:

<telerik:RadCartesianChart>

    <telerik:RadCartesianChart.Series>
        <telerik:BarSeries ShowLabels="False"
                           CategoryBinding="Category"
                           ValueBinding="Value">

            <telerik:BarSeries.DataPoints>
                <telerik:CategoricalDataPoint Category="Apples" Value="20"/>
                <telerik:CategoricalDataPoint Category="Bananas" Value="28"/>
                <telerik:CategoricalDataPoint Category="Oranges" Value="17"/>
                <telerik:CategoricalDataPoint Category="Strawberries" Value="30"/>
            </telerik:BarSeries.DataPoints>
        </telerik:BarSeries>
    </telerik:RadCartesianChart.Series>

    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:LinearAxis x:Name="horizontalAxis1"/>
    </telerik:RadCartesianChart.HorizontalAxis>
    
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:CategoricalAxis/>
    </telerik:RadCartesianChart.VerticalAxis>


</telerik:RadCartesianChart>

Is this possible using the BarSeries? Any help is appreciated.

Thank You,

Giuliano

Giuliano
Top achievements
Rank 1
Iron
 asked on 22 Aug 2024
0 answers
102 views

Hi,

 

I would like to have the DataFormComboBoxField  behave the same way as the Edit mode: Editable, Read-Only and Auto Complete ad in your demo application. But when I set it to readonly it is disabled.

My code:

e.DataField = new DataFormComboBoxField()
{
    ItemsSource = _componentsDS.ComponentKeyWords,
    SelectedValuePath = "KeyWordId",
    DisplayMemberPath = "Abbreviation",
    DataMemberBinding = new Binding("KeywordId") { Mode = BindingMode.TwoWay },
    IsComboboxEditable = true,
    IsReadOnly = true,
    Label = "Keyword"
};

 

The example in your application:

 

Kind regards,

 

Johan

Johan Kramer
Top achievements
Rank 1
 asked on 21 Aug 2024
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
TimeBar
Styling
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?