Telerik Forums
UI for WPF Forum
6 answers
402 views
Hi,

Is it possible to select the row in a grid when a context menu is opened by right clicking on that row?
Maya
Telerik team
 answered on 14 Jun 2013
2 answers
65 views
Hi,

I'm trying to figure out how to have individual RadPanelBarItems have their background colors changed when a user tabs through the RadPanelBar.  Currently when a user selects (left mouse click) a specific RadPanelBarItem, the color changes to orange (the default color); I want to be able to do the same if the user tabs to the item as well. The usage of IsTabStop and TabStop does not seem to work; I could perhaps be setting it incorrectly.   The following is a code snippet of xaml implementation:


 <telerikNavigation:RadPanelBar IsTabStop="True" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" VerticalAlignment="Stretch" x:Name="SummaryMenu" HorizontalAlignment="Stretch" Margin="0,-1,0,-1">

                    <telerikNavigation:RadPanelBar.Background>
                        <ImageBrush ImageSource="pack://application:,,,/Resources/Images/Left-Menu-Back.png" />
                    </telerikNavigation:RadPanelBar.Background>


                    <telerikNavigation:RadPanelBarItem IsExpanded="True" IsTabStop="True" BorderThickness="0">
                            <telerikNavigation:RadPanelBarItem.Header>
                                <TextBlock Text="VIEWS" Style="{StaticResource SmallMenuHeaderIconLabel}" />
                            </telerikNavigation:RadPanelBarItem.Header>

                        <telerikNavigation:RadPanelBarItem IsTabStop="True" TabIndex="1"  MouseLeftButtonDown="SummaryMenuDockingItemLeftButtonDownClick" MouseLeftButtonUp="SummaryMenuDockingItemLeftButtonUpClick" Keyboard.KeyUp="OnKeyPressEnterViewsMenuItem" Tag="MainViewLogicalConfiguration" IsSelected="True">
                                <telerikNavigation:RadPanelBarItem.Header>
                                    <StackPanel Orientation="Vertical">
                                        <Image Source="/Resources/Images/MenuIcons/MainView.png" ToolTip="Main" Style="{StaticResource SmallMenuIcon}"/>
                                        <TextBlock Text="Main" Style="{StaticResource SmallMenuIconLabel}" />
                                    </StackPanel>
                                </telerikNavigation:RadPanelBarItem.Header>
                            </telerikNavigation:RadPanelBarItem>

                        <telerikNavigation:RadPanelBarItem IsTabStop="True" TabIndex="2" MouseLeftButtonDown="SummaryMenuDockingItemLeftButtonDownClick" MouseLeftButtonUp="SummaryMenuDockingItemLeftButtonUpClick" Keyboard.KeyUp="OnKeyPressEnterViewsMenuItem" Tag="PhysicalLayout" >
                                <telerikNavigation:RadPanelBarItem.Header>
                                    <StackPanel Orientation="Vertical">
                                        <Image Source="/Resources/Images/MenuIcons/Physical-Configuration.png" ToolTip="Physical Configuration" Style="{StaticResource SmallMenuIcon}"/>
                                        <TextBlock Text="Physical Configuration" Style="{StaticResource SmallMenuIconLabel}" />
                                    </StackPanel>
                                </telerikNavigation:RadPanelBarItem.Header>
                            </telerikNavigation:RadPanelBarItem>
                        ......
                        ......
               </<telerikNavigation:RadPanelBar>

Thanks for the help,
Robert Quan
Robert
Top achievements
Rank 1
 answered on 13 Jun 2013
2 answers
114 views
Hi ,
When I bind a object in propertygrid like a

PsPropertyGrid1.SelectedObject = MachineConfig
I want to change Category name at runtime for localization

I can change Item name and description with ItemFormatting event as fallow but Categoty property is readonly ,
How can I change category attirubute name at runtime in radpropertygrid... 

Private Sub PsPropertyGrid1_ItemFormatting(sender As Object, e As Telerik.WinControls.UI.PropertyGridItemFormattingEventArgs) Handles PsPropertyGrid1.ItemFormatting
            Select Case e.Item.Name
                Case Is = "MachineID"
                    'e.Item.Enabled = False
                    e.Item.Label = RM.GetString(7760)
                    e.Item.Description = RM.GetString(7761)

                Case Is = "CompanyInfo"
 .....
 .....

            End Select
Sub

Thanks for all helps...

Hakan
Top achievements
Rank 1
 answered on 13 Jun 2013
1 answer
135 views
Hi

I'm dynamically adding data into a timeline, everytime I add a data, I set the PeriodEnd property of the timeline control to the max time in the dataset. I like the TimeLine control to be zoomed out to the maximum when a new data is added, how do I achieve that ? I tried setting VisiblePeroidStart and End to PeroidStart and End but that doesn't work.

Any ideas ?

Thanks, Dave
Petar Kirov
Telerik team
 answered on 13 Jun 2013
2 answers
49 views
Hi there,

I have console application is being launched from the WPF application, and it has been running fine all the time, right after I install 2013Q1, the output (Console.WriteLine) disappeared from the console windows, and only be shown in the output window in visual studio, I double check this behavior from source control as well.

Dimitrina
Telerik team
 answered on 13 Jun 2013
3 answers
94 views
Hi Telerik

I have defined a tileview using a data template and a radfluidcontentcontrol. The small content definition includes a button which initiates some data fetches in order to create a view which is then placed in a binding in the largecontent template. I want to be able to bind the maximizing of a particular tile to the IsVisibleChanged event on a textblock in the small content template for that tile. (The text block is made visible once the view to be placed in the large content has been created). The approach I have attempted (see below) works for the first tile I try but fails after that. Can you have a look and tell me where I am going wrong please?

Many thanks in advance

Regards
Ian Carson

XAML
             x:Class="Bambi.Modules.Dashboards.Views.StrategySummaryView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:Bambi.Modules.Dashboards"
             xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
             xmlns:inf="clr-namespace:Bambi.Infrastructure;assembly=Bambi.Infrastructure"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300"
             Name="Strategy">
    <UserControl.Resources>
        <inf:InvertBoolean x:Key="InvertBoolean"/>
        <inf:BooleanToVisibility x:Key="BooleanToVisibility"/>
        <inf:InvertBooleanToVisibility x:Key="InvertBooleanToVisibility"/>
        <DataTemplate x:Key="HeaderTemplate">
            <TextBlock Text="{Binding StrategyName}" FontFamily="Helvetica Neue LT Com" FontSize="14"/>
        </DataTemplate>
        <DataTemplate x:Key="DailyDataTemplate">
            <telerik:RadFluidContentControl ContentChangeMode="Manual" TransitionDuration="0:0:0.5">
                <telerik:RadFluidContentControl.LargeContent>
                    <ContentPresenter Content="{Binding StrategyDetail}"/> <--This is the created view
                </telerik:RadFluidContentControl.LargeContent>
                <telerik:RadFluidContentControl.SmallContent>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150"/>
                            <ColumnDefinition Width="150"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.17*"/>
                            <RowDefinition Height="0.17*"/>
                            <RowDefinition Height="0.17*"/>
                            <RowDefinition Height="0.17*"/>
                            <RowDefinition Height="0.1*"/>
                            <RowDefinition Height="0.13*"/>
                        </Grid.RowDefinitions>
                        <TextBlock FontFamily="Helvetica Neue LT Com" FontSize="32" Foreground="#FFF39200" VerticalAlignment="Bottom" Margin="0,15,0,0" HorizontalAlignment="Right"><Run Language="en-au" Text="{Binding TradeCount }"/></TextBlock>
                        <TextBlock Grid.Column="1" Margin="8,0,32,0" FontFamily="Helvetica Neue LT Com" Foreground="Gray" FontWeight="Bold" Height="20" VerticalAlignment="Bottom" FontSize="12"><Run Language="en-au" Text="TRADES"/></TextBlock>
                        <TextBlock FontFamily="Helvetica Neue LT Com" FontSize="32" VerticalAlignment="Bottom" Foreground="#FFF39200" Margin="0,15,0,0" HorizontalAlignment="Right" Grid.Row="1"><Run Language="en-au" Text="{Binding Return, StringFormat={}{0:P} }"/></TextBlock>
                        <TextBlock Grid.Column="1" Margin="8,0,32,0" TextWrapping="Wrap" FontFamily="Helvetica Neue LT Com" Foreground="Gray" FontWeight="Bold" Height="20" VerticalAlignment="Bottom" FontSize="12" Grid.Row="1"><Run Language="en-au" Text="RETURN"/></TextBlock>
                        <TextBlock FontFamily="Helvetica Neue LT Com" FontSize="32" VerticalAlignment="Bottom" Foreground="#FFF39200" Margin="0,15,0,0" HorizontalAlignment="Right" Grid.Row="2"><Run Language="en-au" Text="{Binding Probability, StringFormat={}{0:P} }"/></TextBlock>
                        <TextBlock Grid.Column="1" Margin="8,0" TextWrapping="Wrap" FontFamily="Helvetica Neue LT Com" Foreground="Gray" FontWeight="Bold" Height="20" VerticalAlignment="Bottom" FontSize="12" Grid.Row="2"><Run Language="en-au" Text="PROBABILITY"/></TextBlock>
                        <TextBlock FontFamily="Helvetica Neue LT Com" FontSize="32" VerticalAlignment="Bottom" Foreground="#FFF39200" Margin="0,15,0,0" HorizontalAlignment="Right" Grid.Row="3"><Run Language="en-au" Text="{Binding WinLossRatio, StringFormat={}{0:P} }"/></TextBlock>
                        <TextBlock Grid.Column="1" Margin="8,0" TextWrapping="Wrap" FontFamily="Helvetica Neue LT Com" Foreground="Gray" FontWeight="Bold" Height="20" VerticalAlignment="Bottom" FontSize="12" Grid.Row="3"><Run Language="en-au" Text="WIN/LOSS"/></TextBlock>
                        <telerik:RadRating IsReadOnly="False" NumberOfItemsToGenerate="10" Grid.ColumnSpan="2" HorizontalAlignment="Center" Grid.Row="4" Value= "{Binding Ranking}" Margin="0,0,5,5" VerticalAlignment="Bottom"/>
                        <telerik:RadButton Visibility="{Binding RetrievePressed, Converter={StaticResource InvertBooleanToVisibility}}" Content="Retrieve Details" Grid.Row="5" Grid.ColumnSpan="2" telerik:StyleManager.Theme="Expression_Dark" VerticalAlignment="Center" Height="24" Width="150" Command="{Binding DataContext.RetrieveStrategyDetailCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadTileView}} }" CommandParameter="{Binding TrackingID}" />
                        <telerik:RadProgressBar
                            telerik:StyleManager.Theme="Expression_Dark"
                            Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Height="6" Width="150"
                            VerticalAlignment="Center" HorizontalAlignment="Center"
                            IsIndeterminate="True"
                            DataContext="{Binding}"
                            Visibility="{Binding VisibleProgressBar, Converter={StaticResource BooleanToVisibility}}"/>
                        <TextBlock
                            Visibility="{Binding DataComplete, Converter={StaticResource BooleanToVisibility}}"
                            Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2"
                            TextWrapping="Wrap" FontFamily="Helvetica Neue LT Com" Foreground="Gray" FontWeight="Bold" Height="20"
                            VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="12"
                            IsVisibleChanged="TextBlock_IsVisibleChanged">
                            <Run Language="en-au" Text="COMPLETE"/>
                        </TextBlock>
                    </Grid>
                </telerik:RadFluidContentControl.SmallContent>
            </telerik:RadFluidContentControl>
        </DataTemplate>
        <DataTemplate x:Key="HourlyDataTemplate">
            <telerik:RadFluidContentControl ContentChangeMode="Manual" TransitionDuration="0:0:0.5" >
                <telerik:RadFluidContentControl.LargeContent>
                    <Grid Margin="0">
                        <Rectangle Fill="Aqua"  Margin="0"/>
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black"  Text="LargeContent" FontSize="24"/>
                    </Grid>
                </telerik:RadFluidContentControl.LargeContent>
                <telerik:RadFluidContentControl.SmallContent>
                    <Grid Margin="0">
                        <Rectangle Fill="BlueViolet"  Margin="0"/>
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Yellow"  Text="SmallContent" FontSize="24"/>
                    </Grid>
                </telerik:RadFluidContentControl.SmallContent>
            </telerik:RadFluidContentControl>
        </DataTemplate>
        <DataTemplate x:Key="MinutelyDataTemplate">
            <telerik:RadFluidContentControl ContentChangeMode="Manual" TransitionDuration="0:0:0.5" >
                <telerik:RadFluidContentControl.LargeContent>
                    <Grid Margin="0">
                        <Rectangle Fill="Tomato"  Margin="0"/>
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="SteelBlue" Text="LargeContent" FontSize="24"/>
                    </Grid>
                </telerik:RadFluidContentControl.LargeContent>
                <telerik:RadFluidContentControl.SmallContent>
                    <Grid Margin="0">
                        <Rectangle Fill="Silver"  Margin="0"/>
                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Sienna"  Text="SmallContent" FontSize="24"/>
                    </Grid>
                </telerik:RadFluidContentControl.SmallContent>
            </telerik:RadFluidContentControl>
        </DataTemplate>
        <local:StrategyTemplateSelector x:Key="ContentDataTemplateSelector"
                                       DailyDataTemplate="{StaticResource DailyDataTemplate}"
                                       HourlyDataTemplate="{StaticResource HourlyDataTemplate}"
                                       MinutelyDataTemplate="{StaticResource MinutelyDataTemplate}"/>
    </UserControl.Resources>
    <Grid Background="#FF252929">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="274*" />
        </Grid.RowDefinitions>
        <controls:RadTileView Name="StrategiesTiles"
                             telerik:StyleManager.Theme="Expression_Dark"
                             MinimizedColumnWidth="300"
                             MinimizedRowHeight="300"
                             MaximizeMode="One"
                             PreservePositionWhenMaximized="True"
                             ContentTemplateSelector="{StaticResource ContentDataTemplateSelector}"
                             ItemsSource="{Binding StrategyDetails}"
                             ItemTemplate="{StaticResource HeaderTemplate}"
                             TileStateChanged="RadTileView_TileStateChanged"
                             TileStateChangeTrigger="SingleClick"
                             Loaded="StrategiesTiles_Loaded"
                             Grid.Row="0" Grid.RowSpan="2" DataContext="{Binding}"
                             >
        </controls:RadTileView>
    </Grid>
</UserControl>


Code Behind
/// <summary>
/// Interaction logic for DashboardView.xaml
/// </summary>
public partial class StrategySummaryView
{
    public StrategySummaryView()
    {
        InitializeComponent();
    }
 
    public StrategySummaryView(StrategySummaryViewModel viewModel)
        : this()
    {
        DataContext = viewModel;
    }
 
    private void RadTileView_TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
    {
        var item = e.OriginalSource as RadTileViewItem;
 
        if (item != null)
        {
            var fluid = item.ChildrenOfType<RadFluidContentControl>().FirstOrDefault();
            if (fluid != null)
            {
                switch (item.TileState)
                {
                    case TileViewItemState.Maximized:
                        fluid.State = FluidContentControlState.Large;
                        break;
                    case TileViewItemState.Minimized:
                        fluid.State = FluidContentControlState.Small;
                        break;
                }
            }
        }
    }
 
    private void StrategiesTiles_Loaded(object sender, RoutedEventArgs e)
    {
        foreach (var tile in StrategiesTiles.ChildrenOfType<RadTileViewItem>())
        {
            var fluid = tile.ChildrenOfType<RadFluidContentControl>().FirstOrDefault();
            if (fluid != null)
            {
                switch (tile.TileState)
                {
                    case TileViewItemState.Maximized:
                        fluid.State = FluidContentControlState.Large;
                        break;
                    case TileViewItemState.Minimized:
                        fluid.State = FluidContentControlState.Small;
                        break;
                }
            }
        }
    }
 
    private void TextBlock_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
    {
        if ((bool)e.NewValue != true) return;
         
        var textBlock = sender as FrameworkElement;
        if (textBlock == null) return;
 
        var container = textBlock.ParentOfType<RadTileViewItem>();
        if (container == null) return;
 
        container.TileState = TileViewItemState.Maximized;
    }
}


Zarko
Telerik team
 answered on 13 Jun 2013
0 answers
75 views
Good morning!
My name is Andrey. I'm automation tester. Now I work with WPF application and facing with problem: How to cast Rad controls to wpf controls.
I have "Progress barin customer application he is always on the form, but in some case "Progress bar" visible or hidden. I want to know when "Progress barvisible or hidden. After definition "WpfProgressBar" like object i haven't property like visibility. On the other hand i know that RadBusyIndicator have visibility property. Can you help me? Can i to cast Rad controls to Wpf controls or it's impossible?

Thank you for any advice!
 



Andrey
Top achievements
Rank 1
 asked on 13 Jun 2013
1 answer
67 views
Hello,
i have read about the new feature interactive Resizable columns in Q2 2013. 
What are interactive Resizable columns in ganttview? Are there any samples or how can i use it? 

Greetings ...

Miroslav Nedyalkov
Telerik team
 answered on 13 Jun 2013
1 answer
37 views
I received an email today about Q2'13 release and proceeded on updating my copy through the Telerik Control Panel. Point existing project to the new binaries (NoXAML) and build the project. Now, the pre-defined windows doesn't show up and blocks the owner window where it was fired up.

Is this a bug or do I need to re-install my copy?
Richard
Top achievements
Rank 1
 answered on 13 Jun 2013
0 answers
84 views
Good day, Telerik team!
Traversing through RadGridView's documentation didn't answer me a qustion: is there a way to put filter button before column header's text, so it don't slide away to the right every time the column adjust its width according to its content?
Thank you
Yury
Top achievements
Rank 1
 asked on 13 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?