Telerik Forums
UI for WPF Forum
1 answer
139 views
Hi,

I have a GridViewComboBoxColumn which is bound to a List of object with DisplayMemberPath and SelectedValueMemberPath set to the Name and ID properties of this object resp.

This combobox allows to enter text and I need it to accept user entered values which are not even present in its ItemSource.

Is it possible by any means?

Thanks,
Arpit
Maya
Telerik team
 answered on 13 Oct 2011
2 answers
153 views

I am trying to mask out negative numbers while using RadMaskedNumericInput.  There was a thread on setting ext:MaskedInputExtensions.minimum="0" and that works great for us.  We have about 50 RadMaskedNumericInput instances, so I added the following to our style resource xaml for RadMaskedNumericInput:

 

    <Setter Property="ext:MaskedInputExtensions.Minimum" Value="0" />
I am now getting the following exception:
        {"'Set property 'System.Windows.Setter.Property' threw an exception.' Line number '1423' and line position '10'."}
        {"Value cannot be null.\r\nParameter name: property"}

Can this property be in the style resource XAML?  If so, how should that be specified?  Any advise would be appreciated.

Thanks,
-Milt

 

Milt
Top achievements
Rank 1
 answered on 12 Oct 2011
1 answer
138 views
I'm adding MapPinPoint objects to the map but every time map tries to focus the newly added pinpoint and therefore pans the map.
I don't want this behavior so how we can prevent it from automatically panning to the newly added location?
Andrey
Telerik team
 answered on 12 Oct 2011
6 answers
345 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
283 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
84 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
402 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
399 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
125 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
88 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?