Telerik Forums
UI for WPF Forum
1 answer
165 views

Hi, 

The scenario is as follows:

The ViewModel exposes an ObservableCollection of ViewModels
The View has a RadTileList with AutoGenerateTiles=true and Wiring up the AutoGeneratingTile event to set the background color of the Tiles
The Tiles are created dynamically by using DataTemplates based on the type of the ViewModel of the collection of ViewModels exposed by the View's ViewModel
The TileType is bound as every VM in the exposed collection has this property as well.

<tiles:TscTileList x:Name="HomeTileList"
                             ItemsSource="{Binding TileListContentControls, Mode=OneWay}"
                             SelectedItem="{Binding SelectedTileListContentControl, Mode=TwoWay}"
                             ScrollViewer.HorizontalScrollBarVisibility="Auto"
                             AutoGenerateTile="True"
                             AutoGeneratingTile="HomeTileListAutoGeneratingTile">
             
            <tiles:TscTileList.Resources>
                 
                <DataTemplate DataType="{x:Type home:TileListTileContentControlViewModel}">
                    <tiles:TscTile Title="{Binding NavigationItem.Name}" Image="{Binding NavigationItem.Image}" TileType="{Binding TileType}" Style="{StaticResource SimpleTileStyle}"/>
                </DataTemplate>
                 
                <DataTemplate DataType="{x:Type home:AboutTargetWidgetTileListContentControlViewModel}">
                    <tiles:TscTile Title="{Binding NavigationItem.Name}" Image="{Binding NavigationItem.Image}" TileType="{Binding TileType}" Style="{StaticResource AboutTheTargetWidgetStyle}"/>
                </DataTemplate>
                 
            </tiles:TscTileList.Resources>
             
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="SelectionChanged">
                    <command:EventToCommand Command="{Binding TileSelectedCommand}"
                                            CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </tiles:TscTileList>

According to my understanding, as the TileType is bound and is not being set anywhere else (niether in the AutoGeneratingTile event nor in the styles) each of the dynamically created Tiles should stick to the programatically (via XAML) assigned value.

I extended (with empty content, just to understand) the RadTileList and the Tile to be able to see the order of the execution and it happens as follows in the Dynamic scenario:
- Extended RadTileList's AutoGeneratingTile event happens first. It does not matter what is specified in XAML the e.Tile.TileType is always double (I guess because it is the default value of the enum)
-View's AutoGeneratingTile follows with the same behavior

The two above happen in an alternat manner: one then the other until all tiles are "rendered".
- Then, the Extended Tile constructor is fired (for all of them) and the this.Base.TileType property is correctly set here, but as, it was already painted with the value (enum default) found in the AutogeneratingTile events... there is no way to get rid of it and get it work properly unelss using reflection in the AutoGeneratingTile event and manually assingning it.

Is there anyway to make RadTileList repect the value of the TileType in the DataTemplate when doing it dynamically? (it happens the same when the value is explicited in the DataTemplate instead of binding it).

Thanks in advance


Yoan
Telerik team
 answered on 29 Jul 2014
7 answers
98 views
Hello, guys,

The following problem exists:
When you move to the bottom of the grid, and start scrolling up, items are loaded in small portions (3, 5, 20 items), doesn't matter what size of virtual page is set.


Regards,
Yuliya
Dimitrina
Telerik team
 answered on 29 Jul 2014
4 answers
212 views
On the RadCalendar, how do I get the dates that are visible to the user? 

I have tried the DisplayDateChanged event, and it does fire, but I can“t figure out what dates are visible.

Thanks
Kalin
Telerik team
 answered on 29 Jul 2014
6 answers
316 views
I'm calling the following method on my diagram after I've programmatically added the items:

            myDiagram.LayoutAsync(settings: new SugiyamaSettings {
                LayoutContainerChildren = true,
                Orientation = Telerik.Windows.Diagrams.Core.Orientation.Vertical
            });

However, I have several containers, and I'd like the items inside them to be oriented horizontally. How can I achieve this?
Edgars
Top achievements
Rank 1
 answered on 29 Jul 2014
1 answer
116 views
I'm using the rad cartesian chart control to display multiple lineseries. This is working fine. The problem is for some charts the y-axis value is very large eg: 2500000. These values are shortened to 25E+06. How can I display the entire value?
The other problem is I'm creating a datatemplate for Labels, but multiple labels are displayed for a single datapoint. The code i'm using is -

                    TextBlock t = new TextBlock();
                    t.Text = val.ToString();
                    t.Foreground = Brushes.White;
                    t.Background = brush;

                    DataTemplate d = new DataTemplate();
                    d.DataType = typeof(TextBlock);
                    FrameworkElementFactory spf = new FrameworkElementFactory(typeof(TextBlock));
                    spf.SetValue(TextBlock.TextProperty, Convert.ToInt32(val).ToString());
                    spf.SetValue(TextBlock.ForegroundProperty, brush);
                    d.VisualTree = spf;
                    ChartSeriesLabelDefinition cld = new ChartSeriesLabelDefinition();
                    cld.Template = d;
                    lineseries.LabelDefinitions.Add(cld);

I'm not doing this in xaml because the number of lineseries is obtained dynamically. I've also attached a snapshot.
Petar Marchev
Telerik team
 answered on 29 Jul 2014
1 answer
84 views
Hi,

I'm building a chart using the RadCartesianChart control, and using a custom ChartPalette. I have five PaletteEntries specified in the palette, and I want them to be used in a particular order (first plot on the chart uses first color, second plot uses second color, etc) but it seems to be choosing the same two colors (there are only two plots for now) no matter how I order their decelerations in xaml. Is there a way to specify the order in which palette entries are sampled?

Thanks
Petar Marchev
Telerik team
 answered on 29 Jul 2014
1 answer
127 views
Hi, I found that underscore symbols included in a pane header are not displayed in the document host pane header.
Also, I use RibbonView's Backstage menu and its Recent files menu, and if the recent file names have underscore symbols, they are not properly displayed either (RadRibbonButton item).
Please help!
Kalin
Telerik team
 answered on 29 Jul 2014
2 answers
602 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
231 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
140 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
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
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
SplashScreen
Rating
Accessibility
Callout
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?