Telerik Forums
UI for WPF Forum
2 answers
133 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
148 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
54 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
109 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
82 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
78 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
45 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
97 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
1 answer
168 views
Hi there,

I want to import data from *.xls file ( MS Excel 2003 ) bind to my radgridview but I've no idea how to acheive that.

Can anyone give me some hint or example?

Thank you

SweNz
Russ
Top achievements
Rank 1
 answered on 12 Jun 2013
3 answers
115 views
Standard windows control can do this, and sometimes its very handy, especially when you need not to set some value but rather to change it live during some process. When control has focus and mouse whell is moved change it's value using SmallChange property.

It's very easy to implement and very comfortable to use. Thank you!
George
Telerik team
 answered on 12 Jun 2013
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?