Telerik Forums
UI for WPF Forum
2 answers
566 views
Hi, Need a little help to find out how to apply Selected Menu item style. In my case, the IsHighlighted works when we hover over the menu item. But not able to apply the same style, when the menu option is selected. Will appreciate your help.
<UserControl.Resources>
 
    <Style TargetType="{x:Type telerik:RadMenuItem}">
        <Setter Property="Foreground" Value="White"></Setter>
        <Setter Property="Margin" Value="0,0,10,-8"></Setter>
        <Setter Property="FontSize" Value="14"></Setter>
        <Setter Property="Padding" Value="10,6,10,12"></Setter>
        <Setter Property="Cursor" Value="Hand"></Setter>
        <Setter Property="Effect">
            <Setter.Value><DropShadowEffect ShadowDepth="1" Direction="330" Color="Black" Opacity="0.2" BlurRadius="3"/></Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadMenuItem}">
                    <ControlTemplate.Resources>
                        <LinearGradientBrush x:Key="Blue" EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF3386E5" Offset="0"/>
                            <GradientStop Color="#FF0053BC" Offset="1"/>
                        </LinearGradientBrush>
                    </ControlTemplate.Resources>
                    <Border CornerRadius="0,0,5,5" x:Name="HoverBlue" Background="Transparent">
                        <TextBlock Text="{TemplateBinding Header}" FontSize="14" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" Effect="{TemplateBinding Effect}" Margin="{TemplateBinding Padding}"></TextBlock>
                    </Border>                       
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter TargetName="HoverBlue" Property="Background" Value="{StaticResource Blue}"/>
                        </Trigger>
                         
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="Logo" TargetType="{x:Type telerik:RadMenuItem}">
        <Setter Property="Foreground" Value="White"></Setter>
        <Setter Property="Margin" Value="5,3,10,0"></Setter>
        <Setter Property="Cursor" Value="Hand"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadMenuItem}">
                    <Border Background="{DynamicResource TrunomiLogo}" Width="26" Height="26"></Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
 
    </Style>
 
</UserControl.Resources>
<Grid>
    <telerik:RadMenu Height="32" VerticalAlignment="Top">
        <telerik:RadMenu.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF9D9D9D" Offset="0"/>
                <GradientStop Color="#FF7F7F7F" Offset="1"/>
            </LinearGradientBrush>
        </telerik:RadMenu.Background>
        <telerik:RadMenuItem Style="{StaticResource Logo}" Header="Logo" />
        <telerik:RadMenuItem Header="Dashboard" Command="{Binding DashboardClicked}"></telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Entity Manager" Command="{Binding EntityManagerClicked}"></telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Message Center" Command="{Binding MessageCenterManagerClicked}"></telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Audit" Command="{Binding AuditManagerClicked}"></telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Reporting" Command="{Binding ReportingManagerClicked}"></telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Admin" IsEnabled="False"></telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Help" IsEnabled="False"></telerik:RadMenuItem>
    </telerik:RadMenu>
</Grid>

 
Andy
Top achievements
Rank 1
 answered on 28 Jul 2014
1 answer
214 views
Hello,

i have seen two examples for export and printing a gantt chart.
Is it possible to export the gantt chart into one large Image instead of several image pages (paginator)?

Regards,
Robert
Polya
Telerik team
 answered on 28 Jul 2014
1 answer
125 views
Is there quick way to add a color editor the the (Richtext) HighlightColorPicker, so users can create their (corporate) colors
Petar Mladenov
Telerik team
 answered on 28 Jul 2014
4 answers
255 views
Hİ,

I am using a custom connection for a special purpose and want to use MVVM. But I do not know how to create custom connection instance when using MVVM. Because it needs to be created and added to the diagram instance not the graphsource. Graphsource have AddLink method but it do not take RadDiagramConnection. Can you help me to find a way to use that Custom Connection class?
Thank you,
Sarper
Pavel R. Pavlov
Telerik team
 answered on 28 Jul 2014
3 answers
81 views
Hello, I would like to enquire on the scenario as per title. I have already managed to set the values, just that the grid didn't display these values to the user. In other words, when I click "Click here to add new row", the fields are displayed as all blank (or for int column, the value is 0). But my codes do work at the back end - if the user press enter without modifying anything, the custom values I set will be added to the database. So how can I let the user see the custom default values upon clicking "Click here to add new row"? Below is the code I have, which work perfectly back-end, but didn't display to user.

private void GridCommsItem_OnPreparingCellForEdit(object sender, GridViewPreparingCellForEditEventArgs e)
        {
            ((CommsItem)e.Row.DataContext).Status = "Store";
            ((CommsItem)e.Row.DataContext).Quantity = 1;
        }
Dexter
Top achievements
Rank 1
 answered on 28 Jul 2014
1 answer
161 views
Hi,

I have a requirement here to support ALL operations that are possible with mouse also with keyboard.
This means that the user must be able to expand all things by keyboard only.

Now I have groups in the grid view and under the groups there are rows with cells from the GridViewToggleRowDetailsColumn.
So the groups are expandable/collapseable and the rows also.

My question is: How can I navigate to the the toggle buttons of the group header and the row details column to toggle them by keyboard only?

I have subclassed already the DefaultKeyboardCommandProvider to get more control over the navigation commands. But the commands just leave out the group headers and the GridViewToggleRowDetailsColumn is leaved out while the previous row is in edit mode and a TAB key is pressed (MoveNext command is executed). 

I need a tab stop on both kinds of toggle buttons. What is the best way to achieve this?

Thanks
Yoan
Telerik team
 answered on 28 Jul 2014
1 answer
117 views
Hi
I have a problem with TileView.
I put a TileView in a SplitContainer--> RadPane control.
When I Double click and Drag a tile item, an exception will occur.
This is the Exception Message:

An unhandled exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Controls.Docking.dll
 
Additional information: Object reference not set to an instance of an object.
How can I handle this exception

I have another problem with right to left TileView
when I drag a tile in right to left mode, the tile flips horizontally 180 degrees.
I attached a picture of right to left TileView
Pavel R. Pavlov
Telerik team
 answered on 28 Jul 2014
3 answers
306 views
Hello Telerik-Team,

i tried the Pivot Grid and it ist really nice and easy to use.

But I have two questions:

1. Is there any possibility to use different currencies when formatting a decimal value? When I use "C" in "StringFormat" my current culture is used...

2. Can i export the data that is displayed in the control to use in excel or to print?

Thanks for your help.
Rosen Vladimirov
Telerik team
 answered on 28 Jul 2014
1 answer
126 views
hey guys,

i looked at your demo and saw the TableShape example and asked myself, if it is possible that the connections do not overlap (line on line) each other when they are in the same direction (horizontal, vertical)? Because when i will follow one connection with my eyes it is not really comfortable when two or more connections are looking like they are the same.

Jon
Zarko
Telerik team
 answered on 25 Jul 2014
4 answers
150 views
OK, I've searched through the objects pretty thoroughly, and can't seem to find a solution to this problem.  I am trying to retrieve the point (X Y coordinates) within the current page where a mouse event fires (in this case, mouse up event)

I can get the screen coordinates, and from that the coordinates within the control, but I'm interested in returning the Point within the actual page being clicked on.  Any hints?

Deyan
Telerik team
 answered on 25 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?