Telerik Forums
UI for WPF Forum
6 answers
340 views
Hallo,

i have a problem with a RadComboBox. It's ItemsSource is an ObservableCollection<ThemeInfo>. The RadComboBox is a part of a RadRibbonBar. I bound my RibbonBarViewModel to the RadRibbonBar's DataContext property.

Here is the xaml code for my RadComboBox:

<telerik:RadComboBox
                            Name="themesRadComboBox"
                            Width="100" 
                            ItemsSource="{Binding ThemeInfos}"
                            SelectedItem="{Binding SelectedThemeInfo, Mode=TwoWay}"
                            Command="{Binding ChangeApplicationThemeCommand}"
                            DisplayMemberPath="DisplayName">
                        </telerik:RadComboBox>

If i select an item it works fine, but if i do this the second time, DropDownList of RadComboBox stays closed. If the RadComboBox has focus and i use the arrow keys it also works as expected. Any ideas to solve this?
Odd Veibust
Top achievements
Rank 1
 answered on 12 Oct 2011
1 answer
260 views

I need to trim the text the item labels of the x axis to the same width as the bars of my chart. Some of the labels could be quite long, so the end of one label could overlap the beginning of the next (Note: I don’t want to rotate these labels). It also needs to be able to resize if the window size changes or if the amount of bars changes.

 

On my template I have set the texttrimming to use CharacterEllipsis, but obviously this only works if the width is set. So I would like to bind the width of the x axis label to the ActualWidth of the Bar (or Candle).

 

Using Snoop I can see the ActualWidth of PART_MainContainer and a few other PART_ containers that change size with the size of window. So how do I bind to one of these PART_s? If this can be achieved using just XAML that would be great. I don’t really have code behind skills.

This is what I have so far;

>>>> x-axis label style

<Style x:Key="AxisXLabel2D" TargetType="{x:Type telerik:AxisLabel2D}">
    <Setter Property="ItemLabelStyle">
        <Setter.Value>
            <Style TargetType="TextBlock">
                <Setter Property="Foreground" Value="DarkGoldenrod" />
                <Setter Property="FontWeight" Value="Normal" />
                <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="Padding" Value="8,1,8,5" />
                <Style.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="TextTrimming" Value="None" />
                        <Setter Property="FontWeight" Value="DemiBold" />
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Setter.Value>
    </Setter>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type telerik:AxisLabel2D}">
                <Border x:Name="border" BorderThickness="1" BorderBrush="Transparent" CornerRadius="5,2,5,2"
                        Width="{Binding ElementName=PART_MainContainer, Path=ActualWidth}">
                    <TextBlock x:Name="labeltext" Style="{TemplateBinding ItemLabelStyle}">
                    <TextBlock.LayoutTransform>
                        <RotateTransform />
                    </TextBlock.LayoutTransform>
                    <TextBlock.Text>
                        <Binding>
                            <Binding.Converter>
                                <telerik:LabelFormatConverter />
                            </Binding.Converter>
                        </Binding>
                    </TextBlock.Text>
                    </TextBlock>
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="BorderBrush" Value="LightGray" TargetName="border"  />
                        <Setter Property="Background" Value="White" TargetName="border" />
                        <Setter Property="Panel.ZIndex" Value="99999" />
                        <Setter Property="Padding" Value="8,3,8,3" TargetName="labeltext" />
                        <Setter Property="Width" Value="Auto" />
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

>>>>> RadChart
<telerik:RadChart x:Name="radChart">
            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView>
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea SmartLabelsEnabled="True" EnableAnimations="False">
                            <telerik:ChartArea.DataSeries>
                                <telerik:DataSeries>
                                    <telerik:DataPoint YValue="45" XCategory="Subject 01" />
                                    <telerik:DataPoint YValue="48" XCategory="Subject 02" />
                                    <telerik:DataPoint YValue="53" XCategory="Subject 03" />
                                    <telerik:DataPoint YValue="41" XCategory="Subject 04" />
                                    <telerik:DataPoint YValue="32" XCategory="Subject 05" />
                                    <telerik:DataPoint YValue="28" XCategory="Subject 06" />
                                    <telerik:DataPoint YValue="63" XCategory="Subject 07" />
                                    <telerik:DataPoint YValue="74" XCategory="Subject 08" />
                                    <telerik:DataPoint YValue="77" XCategory="Subject 09" />
                                    <telerik:DataPoint YValue="85" XCategory="Subject 10" />
                                    <telerik:DataPoint YValue="89" XCategory="Subject 11" />
                                    <telerik:DataPoint YValue="80" XCategory="Subject 12" />
                                </telerik:DataSeries>
                            </telerik:ChartArea.DataSeries>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>
                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>
        </telerik:RadChart>

>>>>> The code behind that styles the chart
public MainWindow()
        {
            this.InitializeComponent();
 
            this.radChart.DefaultView.ChartArea.Loaded += ChartArea_Loaded;
 
            // Insert code required on object creation below this point.
             
        }
        void ChartArea_Loaded(object sender, RoutedEventArgs e)
        {
            ChartArea area = sender as ChartArea;
            HorizontalAxisLabels2D axisLabelsContainer = area.FindChildByType<HorizontalAxisLabels2D>();
            var axisLabels = axisLabelsContainer.ChildrenOfType<AxisLabel2D>();
            System.Windows.Style style = this.Resources["AxisXLabel2D"] as System.Windows.Style;
 
            foreach (var item in axisLabels)
            {
                item.Style = style;
            }
        }


Secondly, (not really a problem, but I thought I'd ask as I'm here!) Does anyone know how to make it so the CharacterEllipsis (or whatever ellipsis), could appear in the center of the word, not at the end?

For example, a full width label "Test Subject 001", trimmed to say "Test Subje..." is ok, but in this case it would be better if it said "Test Su...001".  I know it's probably not the right place to post this, but any help would be great. Does anything in the RadControls do this?

Thank you in advance.


Evgenia
Telerik team
 answered on 12 Oct 2011
1 answer
79 views
Hi,
is it possible, that the binding to the itemssource is broken in the latest internal build. I have updated my controls and suddendly the tileview won't show any tiles.I'm using an Observable Collection with custom classes as ItemsSource and a ItemContainerStyle.

Are there any changes in the latest build?
Tina Stancheva
Telerik team
 answered on 12 Oct 2011
5 answers
395 views
Hi,

How can I set properties of the ComboBox's in a GridViewComboBoxColumn.

I want to set the ClearSelectionButtonVisibility and ClearSelectionButtonContent properties as described in this thread
http://www.telerik.com/community/forums/wpf/combobox/selectable-null-value-in-radcombobox.aspx

I have tried it with a style in the GridViewComboBoxColumn ressources:

<telerik:GridViewComboBoxColumn.Resources>
    <Style TargetType="Controls:RadComboBox">
        <Setter Property="ClearSelectionButtonVisibility" Value="Visible" />
        <Setter Property="ClearSelectionButtonContent" Value="Test" />
    </Style>
</telerik:GridViewComboBoxColumn.Resources>


This approach is not working.

Thanks and regards,

Franziska
Maya
Telerik team
 answered on 12 Oct 2011
6 answers
392 views
I'm facing the following problem

I am using the RadGridView control and one of the column is of type GridViewComboBoxColumn. When the comboBox column is expanded the drop down list width is not aligned with combobox column width. The drop down width changes according to the size(length) of the items present in the drop down.But i want the drop down width to be aligned with the comboBox column width and it shouldn't resize as per the items present in the drop down. 
  
Valeri Hristov
Telerik team
 answered on 12 Oct 2011
5 answers
114 views
The XAML below resulted in a slider with ticks ranged 0 - 8 instead of 1 - 9. Why is it?


<ResourceDictionary>
    <DataTemplate x:Key="TickTemplate">
        <Grid>
            <TextBlock Text="{Binding}" />
        </Grid>
    </DataTemplate>
</ResourceDictionary>
 
        <telerik:RadSlider x:Name="normalSlider" VerticalAlignment="Center" Maximum="9" Minimum="1"
                Value="5" TickTemplate="{StaticResource TickTemplate}"
                Margin="20 0" TickPlacement="TopLeft" />
Valeri Hristov
Telerik team
 answered on 12 Oct 2011
1 answer
87 views
Hi,

Do we have a control in Telerik which will show networking visualization? Say,I have 3-4 people in my network namely a,b,c,d and b has 3 more 
in his network namely d,e,f.Do we have a control where we can show the same in a proper visualization look such as hypertree or spring graph type?
Is there any such control in Telerik.

Regards,
KKR
Rossen Hristov
Telerik team
 answered on 12 Oct 2011
3 answers
76 views
Hi,

I think it is not a difficult question but I'm searching now since hours and I'm really not able to find the answer.

I've an outer Grid and in the RowDetailsTemplate a RadTabControl and another Grid defined in the TabControl.
OuterGrid -> RowDetailsTemplate -> RadTabControl -> RadTabItem -> InnerGrid
My problem is now, how can I get a reference to the "child" Grid? At the moment can I access the outer grid with "this.outerGridName". The RadTabControl and the inner Grid have both unique names.

My questions are now:
1. How can I get a reference to the inner Grid.
2. Is it possible to navigate from the outer Grid with the RowDetailTemplate to the inner TabControl and Grid? If yes, how?

Thanks in advance
Walter
Ivan Ivanov
Telerik team
 answered on 12 Oct 2011
3 answers
78 views
Dear Telerik,

I am looking for alert feature in schedule view. Is it built in schedule view or I need to customize that one. If need to customize pls provide me a guide line.

Regards

Animesh
Rosi
Telerik team
 answered on 12 Oct 2011
4 answers
85 views
How do you get rid of the pointmark entirely?

thanks,
Jas
Nikolay
Telerik team
 answered on 12 Oct 2011
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?