Telerik Forums
UI for WPF Forum
10 answers
211 views
Is it possible, to display both percent and the actual values behind them?
Right now you can either show percentage of total, or the actual value, but not both.

Or is there a way to get the "raw value" and "total value" of a CellAggregateValue programatically?
Martin Ivanov
Telerik team
 answered on 19 Jan 2021
8 answers
571 views

Hi Team,
We are using RadNavigation view for our menu control. We are using it in submenu configuration way. We are able to create and navigate to different views. We are using .Net Core with No Xaml configuration. We wanted to have theme option for our entire application. For this we have referred and followed CRM application and created the Theme part same as CRM application. We are able to apply theme and change theme as per choice of user for entire application but we are facing some issues with RadNavigationView control. Below are the challenges that we are facing and something that we want to achieve in our application.

1. We are able to apply the theme but on submenus theme does not get applied also it does not get applied for hover and selected state of the menu. We have tried few approaches and still no success?

2. We want user to select theme once and once they have selected the theme we will save their choice and will open the app in the previously saved theme. We are not able to implement it currently.

We are using NoXAML approach hence we have added necessary files .XAML file in the resource dictionary in App.XAML. 

Kindly help us design our application with above 2 points as we are struck in this from few days.

Things we have tried to apply theme colors on hover, for selected menu and for dropdown icon in case of submenu.

<Style x:Key="ItemPreviewStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource RadNavigationViewItemStyle }">
            <Setter Property="IconTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}"
                                          Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=telerik:RadNavigationViewItem}}"
                                          HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ItemBaseStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource ItemPreviewStyle}">
            <Setter Property="Content" Value="{Binding Title}"/>
            <Setter Property="ItemsSource" Value="{Binding SubItems}"/>
            <Setter Property="Foreground" Value="{theme:VoyagerThemeResource Resource=Foreground}" />
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="FocusVisualStyle" Value="{theme:VoyagerThemeResource Resource=AccentBrush}" />
            <Setter Property="Icon" Value="{Binding Icon}" />
            <Setter Property="IconVisibility" Value="{Binding Icon, Converter={StaticResource NullToVisibilityConverter}}"/>
        </Style>

Because of this changes submenus text get the background color but still no affect on hover, selected state and proper theme color of menu. let us know if we are doing anything wrong. Also help us achieving the second case.

Martin Ivanov
Telerik team
 answered on 19 Jan 2021
1 answer
138 views

I have added Radial menu as RadialContextMenu in RadGridView.

I want to get the selectedRow DataContext on item click. 

I tried to set RadRadialMenu.DataContext as Gridview Selected Item, but as ItemClick datacontext is null. Default datacontext of Radial menu is UserControl's DataContext. which need to be replaced with GridView Selected Row.

 

I have one option to Bind DataContex of individual RadRadialMenuItem with GridView selectedItem, but It seems not proper way.

Dinko | Tech Support Engineer
Telerik team
 answered on 19 Jan 2021
4 answers
625 views
In WPF, I used a list to bind to itemsource fot ploting a line for Lineseries. But I don't know how to bind it to plot multi lines. Use list<list<>> ?
I have to plot 500 lines on one line chart. Please help me ~
shaswat
Top achievements
Rank 1
 answered on 19 Jan 2021
2 answers
153 views

I have a GridView with ChildTableDefinitions which adds a column with pluses to expand and see child gridviews. How do I put a header title on that column?

Ilya
Top achievements
Rank 1
 answered on 18 Jan 2021
0 answers
123 views

Hi All,

I Used telerik:ListBox Control which has selection changed Event and for this event I was writing Unit Test code(X-Unit).

VM Code:

var selectionChangedEventArg = parameter as System.Windows.Controls.SelectionChangedEventArgs; 
                if (selectionChangedEventArg != null && selectionChangedEventArg.OriginalSource != null)
                {}

TEST CODE:

////Arrange

 System.Windows.Controls.SelectionChangedEventArgs obj =
            new System.Windows.Controls.SelectionChangedEventArgs(routedEvent, removedItems, addedItems);

////Act

detailViewModel.SelectionChangedCommand.Execute(obj);      

 

selectionChangedEventArg.OriginalSource was null when the method is called from Test method. Any idea to make the original Source has value.

Kishorekumar
Top achievements
Rank 1
Veteran
 asked on 18 Jan 2021
1 answer
540 views

Hello.

I want to load a desktop files in grid view using MVVM. Is there a way? (I'm not use MVVM Light kit.)

It is easy to add and remove files by using buttons, but Drag and Drop is difficult to implement because there are not many examples.

I want to add it using the file model using drag and drop and add it to the column by customizing it.

See the image for details.

 

<This is a simple .xaml>

<telerik:RadGridView ItemsSource  ="{Binding MultiFiles}"
                                     rad:GridViewSelectionUtilities.SelectedItems = "{Binding MultiFileItems}"
                                     GroupRenderMode ="Flat"
                                     HorizontalAlignment="Stretch"
                                     AutoGenerateColumns="False"
                                     ShowColumnHeaders="True"
                                     ShowGroupFooters="False"
                                     ShowGroupPanel="False"
                                     RowIndicatorVisibility="Collapsed"
                                     EnableColumnVirtualization="True"
                                     EnableRowVirtualization="True"
                                     VirtualizingPanel.IsVirtualizing="True"
                                     ScrollViewer.HorizontalScrollBarVisibility ="Auto"
                                     ScrollViewer.VerticalScrollBarVisibility ="Auto"
                                     FrozenColumnsSplitterVisibility="Collapsed"
                                     IsFilteringAllowed="False"
                                     AutoExpandGroups="False"
                                     ShowSearchPanel="False"
                                     SearchPanelCloseButtonVisibility="Collapsed"
                                     SelectionMode="Extended"
                                     SelectionUnit="FullRow"
                                     >
                    <telerik:RadGridView.Resources>
                        <Style x:Key="CheckboxCellStyle" TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
                            <Setter Property="HorizontalContentAlignment" Value="Center"/>
                        </Style>
                    </telerik:RadGridView.Resources>
                     
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewSelectColumn />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
                                                    ToolTip="{Binding Name}"
                                                    IsReadOnly="True"
                                                    Width="300"
                                                    Header="File Name"/>
                        <telerik:GridViewComboBoxColumn ItemsSourceBinding ="{Binding WorkTypes}"
                                                        DataMemberBinding="{Binding WorkType}"
                                                        DisplayMemberPath="Name"
                                                        SelectedValueMemberPath="Name"
                                                        IsReadOnly="False"
                                                        Width="80"
                                                        Header="WorkType"
                                                        >
 
                        </telerik:GridViewComboBoxColumn>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Status}"
                                                    ToolTip="{Binding Status}"
                                                    IsReadOnly="True"
                                                    Width="60"
                                                    Header="Status"/>
                         
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding EtcText}"
                                                    ToolTip="{Binding EtcText}"
                                                    IsReadOnly="True"
                                                    Width="auto"
                                                    Header="ETC"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>

 

<Model>

public class MultiFileModel
{
    public string Name      { get; set; } = string.Empty;
    public string WorkTypes { get; set; } = string.Empty;
    public string Status    { get; set; } = $"X";
    public string EtcText   { get; set; } = string.Empty;
}

 

<ViewModel>

?

 

Thanks.

Martin Ivanov
Telerik team
 answered on 18 Jan 2021
3 answers
294 views

Is there a way to completely hide the Navigation area on a RadMap? I can hide the navigation buttons themselves but the background circle remains. I am using the fluent theme.

I have attached two images to help you see what I am describing. The first picture shows the window with the navigation visible. In the second image I have set NavigationVisibility to collapsed. This removed the arrow buttons but left the background circle. Is there a way to remove that background circle along with the navigation buttons?

Don
Top achievements
Rank 1
Veteran
 answered on 14 Jan 2021
17 answers
1.0K+ views

    Hello Telerik,

 

I am having a situation when using expandable rows.

When they have no children, the Expand Button keeps displaying.

Since it will come up empty, there is no reason for it to be there

so what I want is to hide it in case the row has no children.

I another ticket, I was guided to see this link

http://www.telerik.com/forums/show-and-hide-expand-button-dynamically

But in my case I will have no such "clean" button. I simply want to hide the expand buttons during the grid load time without losing performance (I have 1 mil rows and 4 mil children spread among them)

 

Please show me the best way to achieve this.

it has to do with

row.IsExpandable = false;

at some point, right? What's is it?

 

Thank you.

Ilya
Top achievements
Rank 1
 answered on 14 Jan 2021
3 answers
147 views
I am using the Windows8Touch theme with custom colors I generated via the Theme color generator application It works well.  Except for one thing.  In the File Open dialog, no matter what I do, I cannot get one of the text labels -- just the one -- to honor any of the colors I set. 

It is the label at the bottom of the dialog that says "File Name" (at least when English is the language).  It is next to an edit box that shows the file name.  No matter what I do, that little label always shows up as black.   I have attached an image showing what I mean.  The label that I cannot color is circled in red in the image

So I have two questions:

1. Is there some Palette color I can set in the Windows8Touch theme that will make this little label get colored correctly -- without forcing me to write a style or control template?
2. If not, and I am forced to restyle the control myself, then in what part of of what control template or style do I change something?   (Note that I have tried already - copying the DialogWindowTemplate et al and setting both Foreground and TextElement.Foreground in a few places but I cannot figure out where it would go)

If it matters, here are the custom colors I am using:

<Color x:Key="GsBackgroundDarkColor"            >#002B35</Color>
<Color x:Key="GsForegroundLightColor"           >#FFFFFFFF</Color>
<Color x:Key="GsMediumColor"                    >#FFC0C0C0</Color>
<Color x:Key="GsLowColor"                       >#758595</Color>
<Color x:Key="GsHighColor"                      >#FFBDBDC2</Color>
<Color x:Key="GsAccentColor"                    >#FF26A0DA</Color> <!-- This is the standard Windows8Touch accent color-->
<Color x:Key="GsEffectHighColor"                >#92376472</Color>
<Color x:Key="GsEffectLowColor"                 >#FF1E2D3A</Color>


And here is my initialization code where I set up the Windows8TouchPaele


var palette = Windows8TouchPalette.Palette;
 
 
palette.FontSizeXXL = UserSettings.FontSizeTitle;
palette.FontSizeXL  = UserSettings.FontSizeHeader;
palette.FontSizeL   = UserSettings.FontSize;
palette.FontSize    = UserSettings.FontSizeMedium;
palette.FontSizeS   = UserSettings.FontSizeSmall;
 
palette.FontFamily  = new FontFamily("Segoe UI");
 
 
if (Application.Current.TryFindResource("GsBackgroundDarkColor") is not Color backColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find background color");
}
else
{
    palette.MainColor               = backColor;
    palette.InvertedForegroundColor = backColor;
}
 
if (Application.Current.TryFindResource("GsForegroundLightColor") is not Color foreColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find foreground light color");
}
else
{
    palette.MainForegroundColor = foreColor;
    palette.InvertedColor       = foreColor;
}
 
if (Application.Current.TryFindResource("GsLowColor") is not Color lowColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find GsLowColor");
}
else
{
    palette.LowColor = lowColor;
}
 
if (Application.Current.TryFindResource("GsMediumColor") is not Color medColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find GsMediumColor");
}
else
{
    palette.MediumColor = medColor;
}
 
if (Application.Current.TryFindResource("GsHighColor") is not Color highColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find GsHighColor");
}
else
{
    palette.HighColor = highColor;
}
 
if (Application.Current.TryFindResource("GsAccentColor") is not Color accentColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find GsAccentColor");
}
else
{
    palette.AccentColor = accentColor;
}
 
 
if (Application.Current.TryFindResource("GsEffectLowColor") is not Color effectLowColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find GsEffectLowColor");
}
else
{
    palette.EffectLowColor = effectLowColor;
}
 
if (Application.Current.TryFindResource("GsEffectHighColor") is not Color effectHighColor)
{
    Debug.Assert(false);
    Log.Error("Failed to find effectHighColor");
}
else
{
    palette.EffectLowColor = effectHighColor;
}
 
 
 
var theme = new Windows8TouchTheme();
StyleManager.ApplicationTheme = theme;






Vladimir Stoyanov
Telerik team
 answered on 14 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?