Telerik Forums
UI for WPF Forum
1 answer
261 views

Hi,
I use the Wizard in a MVVM Based App.

I have a WizardControlView and a WizardControlViewModel.

<telerik:RadWizard x:Name="wizard"                           
                               HorizontalAlignment="Left"
                               Height="300"
                               VerticalAlignment="Top"
                               Width="500"                           
                               IsContentPreserved="True"
                               localControlsBindings:RadWizardPageBinding.ItemSource ="{Binding WizardPages}">       
</telerik:RadWizard>

Inside the WizardPages are no footer with buttons defined.
I use the default footer.

No I can see the buttons in the footer.
When I click e.g. the Cancel Button I want to react inside the WizardControlViewModel and not in the WizardControlView (according MVVM).

Is it possible ?

Regards
Stefan

Stefan
Top achievements
Rank 1
 answered on 07 Sep 2018
1 answer
144 views
Hi

Is it possible to insert a separator between the RadPane headers in a RadPaneGroup?

/Flemming Rosenbrandt
Stefan
Telerik team
 answered on 07 Sep 2018
1 answer
467 views

Hi, I have a chart that display gridlines using the cartesianchartgrid, defined like this in xaml:

<telerik:RadCartesianChart.Grid>
    <telerik:CartesianChartGrid MajorLinesVisibility="XY"/>
</telerik:RadCartesianChart.Grid>

 

But I can't figure out how to change the color of the gridlines. I don't see any brush or color properties for it on the class, changing the foreground etc brush does not work.

Kalin
Telerik team
 answered on 07 Sep 2018
0 answers
145 views

I have a and that are synced. When one or more appointments are selected in the , it updates the above by adding tasks (only the root task) to the source of the only if those tasks are not already in the list else the list is left as is. 

Now sometimes when I am selecting multiple appointments the bindings on the Textblock display incorrectly in the Ganttview as seen in the before and after pics. It's the correct object behind the display UI element, only its binding seems to be boggled up for some reason. Sometimes when selecting another appointment, the UI updates correctly but most of the time it doesn't.

I modified the event container -  

<ControlTemplate  x:Key="EventContainerTemplate2" TargetType="telerik:EventContainer">

- that I found in Telerik's dictionaries and added the following in order to display the text on the bars:

<TextBlock x:Name="txtBlock" Padding="5"
   Text="{Binding DataItem.Title}"
   FontSize="{Binding DataItem.Appearance.FontSize}"
   FontWeight="{Binding DataItem.Appearance.FontWeight, Converter={StaticResource ConvertStringToFontWeight}}"
   Foreground="{Binding DataItem.Appearance.HexForeground, Converter={StaticResource ConvertHexToBrush}}"/>

DataItem is a GanttTask that implements the IGanttTask interface.

 

Here is the code that executes when appointments are selected (on selection changed event) in the ScheduleView:

private void scheduleView_AppointmentSelectionChanged(object sender, SelectionChangedEventArgs e)
{
    if (vm != null && vm.SelectedAppointment != null && ViewMode == "Resource")
    {
        vm.GanttTaskList = new ObservableCollection<GanttTask>();
        List<string> ids = new List<string>();
        foreach(object o in this.scheduleView.SelectedAppointments)
        {
            AppointmentTask app = o as AppointmentTask;
            IPlanTask task = app.UnderlyingTask.RootParent;
            if(!ids.Contains(task.IPlanTaskID))
            {
                vm.GanttTaskList.Add(new GanttTask { UnderlyingTask = task });
                ids.Add(task.IPlanTaskID);
            }
        }
        
        this.ganttView.TasksSource = vm.GanttTaskList;
        vm.RaisePropertyChanged(nameof(vm.GanttTaskList));
    }
}
Natasha
Top achievements
Rank 1
 asked on 06 Sep 2018
1 answer
185 views

How do I hide the Time Ruler above the ScheduleView i.e. the TimeRulerItem and TimeRulerGroupItem? 

 

I have tried the following:

<scheduleView:TimeRulerItemTemplateSelector x:Key="TimeRulerItemTemplateSelector">
    <scheduleView:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
        <DataTemplate>
            <WrapPanel Background="{StaticResource Palette_7}">
                <TextBlock Padding="5" Text="{Binding FormattedValue}"
                        Foreground="{StaticResource White_Colour}"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        FontSize="11"/>
            </WrapPanel>
        </DataTemplate>
    </scheduleView:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
    <scheduleView:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
        <DataTemplate>
            <WrapPanel Background="{StaticResource Palette_7}">
                <!--<TextBlock Padding="5" Text="{Binding FormattedValue}"
                        Foreground="{StaticResource White_Colour}"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        FontSize="11"/>-->
            </WrapPanel>
        </DataTemplate>
    </scheduleView:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
    <scheduleView:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
        <DataTemplate>
            <WrapPanel Background="{StaticResource Palette_2}">
                <TextBlock Padding="5" Text="{Binding FormattedValue}"
                        Foreground="{StaticResource White_Colour}"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        FontSize="14"
                        MinWidth="50"/>
            </WrapPanel>
        </DataTemplate>
    </scheduleView:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
</scheduleView:TimeRulerItemTemplateSelector>
<Style TargetType="scheduleView:TimeRulerGroupItem" x:Key="TimeRulerGroupItemStyle">
 <Setter Property="Visibility" Value="Collapsed"></Setter>
</Style>
<Style TargetType="scheduleView:TimeRulerItem" x:Key="TimeRulerItemHide">
 <Setter Property="Visibility" Value="Collapsed"></Setter>
</Style>
<scheduleView:OrientedTimeRulerItemStyleSelector
 HorizontalGroupItemStyle="{StaticResource TimeRulerGroupItemStyle}"
 MajorHorizontalTickStyle="{StaticResource TimeRulerItemHide}"
 MinorHorizontalTickStyle="{StaticResource TimeRulerItemHide}"
 x:Key="TimeRulerItemStyleSelector">
</scheduleView:OrientedTimeRulerItemStyleSelector>
<telerik:RadScheduleView 
   TimeRulerItemTemplateSelector="{StaticResource TimeRulerItemTemplateSelector}"
   TimeRulerItemStyleSelector="{StaticResource TimeRulerItemStyleSelector}"
</telerik:RadScheduleView>

 

But it causes incredibly weird behavior that has left me stumped. When I scroll it shows the time ruler but only half rendered and it only seems to apply the rule to some of the items. See the attached picture to see what I mean.

Natasha
Top achievements
Rank 1
 answered on 06 Sep 2018
1 answer
186 views
I found an intriguing problem in my WPF application. I'm using the AssemblyResolve feature to manage dependencies on Telerik DLLs. So far everything works normally. Telerik.Windows. * DLLs, when prompted, are loaded and returned by the AssemblyResolve event. I noticed that in some situations, the requested name is terminated by ".resources". In this case the event returns null (procedure I checked on some forums).

The RadRichTextbox component is instantiated and loaded normally in my application. But I noticed that some functions do not work. For example the context menu on the document does not appear when triggered by the right mouse button. By performing some tests I found that when I put the Telerik.Windows.Controls.RichTextBoxUI.dll DLL in the same folder as my EXE, everything works perfectly. The context menu appears as expected.

Because the Telerik components use many dependencies, I would very much like to make them available in a specific directory. What am I doing wrong in my AssemblyResolve event? The procedure to return null when the event is triggered with the name ".resources" is correct?
Tanya
Telerik team
 answered on 06 Sep 2018
0 answers
62 views

Hello

I have a gridview with text search activated.

How could i limit the number of characters that can be entered in TextSearch?

 

<telerik:RadGridView Name="rgvExplorador"                                         
                      GridLinesVisibility="Both"                                            
                      GroupPanelBackground="LightGray"
                      GroupPanelForeground="Black"                                
                      ShowSearchPanel="True"
                      ShowGroupPanel="False"                                     
                      d:LayoutOverrides="Height"
                      Grid.Row="1"
                      FontSize="10.667"
                      CanUserResizeColumns="False"
                      CanUserFreezeColumns="False"
                      AutoGenerateColumns="False"
                      SelectionMode="Single"
                      ItemsSource="{Binding}"
                      RowIndicatorVisibility="Collapsed"
                      GroupRenderMode="Flat"
                      GroupRowIsExpandedChanged="rgvExplorador_GroupRowIsExpandedChanged">
alejandro
Top achievements
Rank 1
 asked on 06 Sep 2018
5 answers
398 views
Is there a working sample WPF project that uses the Fluent Theme for our reference? We are having some difficulties integrating the theme into our application.
Martin Ivanov
Telerik team
 answered on 06 Sep 2018
1 answer
568 views

Hello there,

 

This topic isn't a question or looking for help, I just wanted to share my experience with one thing that costed me weeks of work and could've been avoided easly. 

 

So, in my WPF application I have 1 quite big page - 12k+ lines of code behind + xaml. Having so big class in application causes, ofc, problems, but what I've had to deal with was memory leaks. Page, mentioned above, is an Order page, consists many elements and data, but what is important is 1 RadGridView - Order Lines GridView. Now, my client expects application to have various styles and colors, so I have few CellStyleSelectors and 1, simple, RowStyle:

 

<Style TargetType="telerik:GridViewRow"
       x:Key="NormalStyle"
       BasedOn="{StaticResource GridViewRowStyle}">
    <Setter Property="Background"
            Value="{Binding Color}" />
    <Setter Property="Foreground"
            Value="Black" />
 
    <Setter Property="BorderThickness"
            Value="0 0 1 0" />
</Style>

 

It is used to get desired background color from database and set it to row. And here is where my problems have started.

If you don't set such style, color will be, naturally, bound to current application style (default - Office Black), but what will happen, when you declare, that you will provide hex color code and you don't?

I've had some misscomunication problems with my database dev, he had no idea, that he must to provide something in Color column (20-30% of returned rows were Null) and I wasn't aware of that. 

And it is a HUGE problem problem for application. Now, I want to share some of my experiences with that:

  • Rendering time:

    Before I've realized that this is a problem, I've tested some scenarios. My approach was to remove everything unnecessary from Order page, which lead me to have only my RadGridView. I've done some testing for 330 records, and rendering time was around 1 minute (54s - 74s). 

  • Virtualization solution:

    It is said in Telerik documentation, that Grid Virtualization is turned on and should be never turned off. Well, for this specific problem, turning it off increased first render of Page by 300%, but ALLOWED user to scroll through RadGridView. It was nearly impossible (in rational time) to scroll grid down from first item, to the last item. It is because every new visual element (row) needs to be rendered, and for this case, app was searching for correct color to set (unexpectly, it is very long process). 

  • Deferred Searching

    Here is the issue simillar to virtualization problem - with

    OrderLinesGrid.IsSearchingDeferred = false;

    set, it was nearly impossible to filter Order Lines Grid, using built-in search panel. 

  • Check box column issues

    The first place I've found problematic in the matter of performance, was mine checkbox column defined as below:

    <telerik:GridViewDataColumn.CellTemplate>
                               <DataTemplate>
                                   <CheckBox IsChecked="{Binding CzyMagWyprz, Mode=TwoWay}"
                                             HorizontalAlignment="Center"
                                             Checked="ToggleButton_OnChecked"
                                             Unchecked="ToggleButton_OnChecked" />
                               </DataTemplate>
                           </telerik:GridViewDataColumn.CellTemplate>
    Maybe I've implemented it somehow wrong, but such checkbox column causes increased render times for page, with and without virtualization. 


Lets compare above 4 points with current state of my application (after fixing problem - correclty returning color):

  • Rendering time:
    For 330 positions and virtualization turned OFF, opening new page is ~ 30.98 s long. The same page with virtualization turned ON opens in... ~ 2,35 s
  • Virtualization solution:
    Well, scrolling through 330 rows with some styling is a little too slow. I mean, it is not completly fluent (with virtualization turned on), but well, opening time makes it negligible.
  • Deferred searching:
    I let end user to choose if he want to use Deffered Searching, because it is not so fluent and fast, but still, it's speed now is comparable to gridview without row virtualization
  • Checkbox column:
    I've removed it. Here is some of my page opening measurements:


    With checkbox:
    1. 4.46 s
    2. 4.59 s
    3. 4.60 s
    4. 4.60 s
    5. 5.76 s
     
    ~ 4.80 s
     
    Without checkbox:
    1. 4.46 s
    2. 3.35 s
    3. 4.91 s
    4. 4.34 s
    5. 3.49 s
     
    ~ 4.11 s

    and it is not about those 0.7 s, it is more about scrolling and working on gridview. Removing custom checkbox column, makes impression of completly fluent work on it. What is interesting, regular checkbox column defined as 

    <telerik:GridViewSelectColumn Name="CheckBoxColumn"
                                                     EditTriggers="CellClick"
                                                     
                                                     >
     
                       </telerik:GridViewSelectColumn>

    doesn't really affect fluency or time but custom one does.

 

As a conclusion, I wanted to point out that XAML really doesn't like null data, when you declare that you will provide not-null data. Remember to be really carefull about it. 

 

Best regards, 

Mateusz

Dilyan Traykov
Telerik team
 answered on 05 Sep 2018
3 answers
121 views

Hello, I have a big problem with the RadTreeListView,when I set the ValidatesOnDataErrors to InViewMode. When there is error on the cell I only see the error indicator in the top right corner when I click the cell but if I lost focus on the cell then the error indicator in the corner disappear.

Svetoslav
Top achievements
Rank 1
 answered on 05 Sep 2018
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
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?