Telerik Forums
UI for WPF Forum
2 answers
325 views

I can’t get this to work. I can bind items to a listbox in the same way without problem…

 

 

 

<telerik:RadDocking DataContext="{Binding Source={StaticResource CustomerViewModel}}">

 

 

 

 

    <telerik:RadSplitContainer ItemsSource="{Binding Path=Customers}">

 

 

 

 

        <telerik:RadSplitContainer.ItemTemplate>

 

 

 

 

            <DataTemplate>

 

 

 

 

                <telerik:RadPaneGroup >

 

 

 

 

                    <telerik:RadPane Header="{Binding Path=CustomerName}">

 

 

 

 

                    </telerik:RadPane>

 

 

 

 

                </telerik:RadPaneGroup>

 

 

 

 

            </DataTemplate>

 

 

 

 

        </telerik:RadSplitContainer.ItemTemplate>

 

 

 

 

    </telerik:RadSplitContainer>

 

 

 

 

</telerik:RadDocking>

 

Tau Sick
Top achievements
Rank 1
 answered on 29 Jan 2010
5 answers
153 views
Hi,

I was told by Evan Hutnick that you were working on a TreeListView for WPF and that it should be made available in a Beta Release around the Q3 release. I cannot find it anywhere so I was wondering if I've missed something or what the status is on that control?

We have a project where such a control is very important and I would consider replacing the one we have with yours if it was good.
Valentin.Stoychev
Telerik team
 answered on 29 Jan 2010
3 answers
181 views
Hello,
I am having a problem with a combo box column in my GridView using WPF. 
The gridview rows and combo box are bound to two separate collections, linked by a key of type integer.
When the gridview loads both the rows and combobox column are filled with the correct data, but when I try to update the value in the combobox (select a different value) it does not work. 
I can open the combobox list and see the different values available, but when I try to select a value in the combo box it reverts back to the original value.

My gridview is setup with the following xaml:
<telerik:RadGridView Name="rgvAppConfig" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollMode="RealTime" IsTabStop="False" 
                                             AutoGenerateColumns="False" ColumnsWidthMode="Auto" ItemsSource="{Binding}"                                                
                                            > 
                        <telerik:RadGridView.Columns> 
                                <telerik:GridViewDataColumn UniqueName="Id" IsVisible="False" /> 
                                <telerik:GridViewDataColumn UniqueName="MessageType" Header="Message Type"/> 
                                <telerik:GridViewDataColumn UniqueName="Description" Header="Description"/> 
                                <telerik:GridViewDataColumn UniqueName="SaveLocation" Header="Save Location"/> 
                                <telerik:GridViewDataColumn UniqueName="FieldDelimiter" Header="Field Delimiter"/> 
                                <telerik:GridViewDataColumn UniqueName="ComponentDelimiter" Header="Component Delimiter"/> 
                                <telerik:GridViewDataColumn UniqueName="SubComponentDelimiter" Header="SubComponent Delimiter"/> 
                            <telerik:GridViewComboBoxColumn UniqueName="ImageType" Header="Image Type" DisplayMemberPath="Name" DataMemberBinding="{Binding SaveImageType}" SelectedValueMemberPath="Id"  ItemsSource="{Binding}" /> 
                            <telerik:GridViewDataColumn UniqueName="Enabled" HeaderText="Enabled"/> 
                            </telerik:RadGridView.Columns> 
                        </telerik:RadGridView> 

</telerik:RadTabItem> 

Which is loaded with the following:
IList<Common.DAL.AppConfig> appConfig = 
                        (from x in Common.DAL.AppConfig.All() 
                         select x).ToList(); 
IList<Common.DAL.ComBinaryType> comBinaryType = 
                        (from x in Common.DAL.ComBinaryType.All() 
                         select x).ToList(); 
rgvAppConfig.Columns["ImageType"].DataContext = comBinaryType; 
rgvAppConfig.DataContext = appConfig; 

How can I resolve this so when a value it selected from the combo box it retains the value to was selected and updates the collection?

Thanks,
Matt
Pavel Pavlov
Telerik team
 answered on 29 Jan 2010
1 answer
44 views
I have a Bar chart defined where the user can toggle between 2-D and 3-D.  XCategory labels work great in 2-D, but in 3-D pointmark values are displayed instead of labels.  Is there a way to show pointmark labels instead of values in 3-D?
Ves
Telerik team
 answered on 28 Jan 2010
5 answers
94 views
Hello,
    I've loaded a datatable cell with some text but the associated grid cell is not showing anything unless I click on the cell. When I click on the cell 3-4 lines of text appear.
I have to set the grid to read-only so now nothing will show up because the cell is read-only.
Any help would be appreciated.
Thanks
Jorge Gonzalez
Top achievements
Rank 1
 answered on 28 Jan 2010
5 answers
983 views
I am trying to dynamically add tabs to a TabControl using code behind where the template used for HeaderTemplate includes bound controls. Everything is working as I expected, except I cannot get the bound data to appear on the tab.

This is my header template:
    <Application.Resources> 
        <DataTemplate x:Key="TabItemHeaderTemplate">  
            <StackPanel Orientation="Horizontal" IsHitTestVisible="False">  
                <TextBlock Name="tbTabCaption" Foreground="Black" Margin="3,0,0,0" Text="{Binding Path=ConfigModel}"/>  
            </StackPanel> 
        </DataTemplate> 
    </Application.Resources> 

And this is my TabControl declaration:
        <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Vertical" > 
            <TextBlock  Margin="5" FontWeight="Bold" Text="Select a product configuration"></TextBlock> 
            <telerikNavigation:RadTabControl x:Name="tabControl" Margin="2" SelectionChanged="tabControl_SelectionChanged" TabStripPlacement="Left" VerticalAlignment="Top" HorizontalAlignment="Left">  
            </telerikNavigation:RadTabControl> 
        </StackPanel> 
 

Here is my code behind for adding a new tab to the TabControl:
CProductConfiguration myObject = new CProductConfiguration();     
    
RadTabItem newTabItem = new RadTabItem()        
{        
    DataContext = myObject,        
    HeaderTemplate = (DataTemplate)Application.Current.Resources["TabItemHeaderTemplate"],        
    Margin = new Thickness(2),        
    MinHeight=50,        
    MinWidth=100        
};        
tabControl.Items.Add(newTabItem);       

And here is a stripped down version of the object I am trying to bind:
public interface IProductConfiguration  
{  
    string ConfigModel { get; }  
}  
 
class CProductConfiguration : IProductConfiguration  
{  
    public string ConfigModel  
    {  
        get { return "MyModel"; }  
    }  
}  
 

I have tried setting the DataContext of the tab item (as shown), the tab control, and the window itself without any change. Changing the order in which the item's properties are set also had no affect. I know the tempate is being used because if I change the binding to static text, the text is displayed on the tab correctly. What am I missing here?
Bobi
Telerik team
 answered on 28 Jan 2010
8 answers
179 views
Hi,

We are considering using the Telerik control suite for our project but one issue which is of extreme importance to us is Localization.

We understand that your Winforms controls supoprt Right To Left languages and we were wondering if the same were true for your WPF and Silverlight controls.
 
We understand that this might be a naive question as we have not really looked into Localization for XAML based applications so we don't really know how it is done.

For our current product we already have customers in the Middle East however they are geting by on the English version of the application as the technology used is not localizable.  Our new product will be written using C# and probably Winforms but we have not completely decided which way to go between WPF and  Windforms yet.
 
The main reason for asking this question is that you explicitly state that your Windforms Controls support Right to Left languages but we could not find any similar statement for the WPF controls. Just wanting to put our minds at rest that we will not run into problems later on in our project.

Regards
Jim
Daze507
Top achievements
Rank 1
 answered on 28 Jan 2010
1 answer
115 views
I've added an event handler for drag and drop to the tile view, but when I move the TileViewItems the event is not fired. Is there another event that is being fired when the items' order is changing?

Thanks,
Michael
Tihomir Petkov
Telerik team
 answered on 28 Jan 2010
1 answer
63 views

Hi all,

I'm trying to apply the telerik themes in a chart. When I use the Office Blue the labels appears in White and I don't like it... how can I customize this property like black color? Any code sample?

Many thanks in advance.

Dwight
Telerik team
 answered on 28 Jan 2010
1 answer
70 views
Hi there,

I tried to restyle the legend of my chart area.
I have two styles to define. First one is, that the legend only appears when a togglebutton (outside of the chart) is clicked. The legend position is over the whole size of the chart. For this reason i override the chart template as follows:
<ControlTemplate x:Key="_chartControlTemplate" TargetType="{x:Type telerik:RadChart}">                 
 <Grid Background="{TemplateBinding Background}"
  <Grid x:Name="PART_DefaultLayoutGrid"
   <Grid.ColumnDefinitions> 
    <ColumnDefinition Width="Auto"/> 
   </Grid.ColumnDefinitions> 
   <Grid.RowDefinitions> 
    <RowDefinition Height="Auto"/> 
    <RowDefinition Height="*"/> 
   </Grid.RowDefinitions> 
   <ContentPresenter x:Name="PART_DefaultChartTitleContainer" Grid.Column="0" Grid.Row="0" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/> 
   <ContentPresenter x:Name="PART_DefaultChartAreaContainer" Grid.Column="0" Grid.Row="1" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/> 
   <ContentPresenter x:Name="PART_DefaultChartLegendContainer" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Visibility="{Binding ElementName=LegendVisibilityButton, Path=IsChecked, Converter={StaticResource legendConverter}}"/> 
  </Grid> 
  <ContentPresenter Height="Auto" Width="Auto" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/> 
 </Grid> 
</ControlTemplate> 

The second style is, that the legend is placed between the title and the chartarea.
Therefore i override the chart template and set the legendstyle to the chart:
<ControlTemplate x:Key="_chartControlTemplate" TargetType="{x:Type telerik:RadChart}">                 
 <Grid Background="{TemplateBinding Background}"
  <Grid x:Name="PART_DefaultLayoutGrid"
   <Grid.ColumnDefinitions> 
    <ColumnDefinition Width="Auto"/> 
   </Grid.ColumnDefinitions> 
   <Grid.RowDefinitions> 
    <RowDefinition Height="Auto"/> 
    <RowDefinition Height="Auto"/> 
    <RowDefinition Height="*"/> 
   </Grid.RowDefinitions> 
   <ContentPresenter x:Name="PART_DefaultChartTitleContainer" Grid.Column="0" Grid.Row="0" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/> 
   <ContentPresenter x:Name="PART_DefaultChartAreaContainer" Grid.Column="0" Grid.Row="2" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/> 
   <ContentPresenter x:Name="PART_DefaultChartLegendContainer" Grid.Column="0" Grid.Row="1" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Visibility="{Binding ElementName=LegendVisibilityButton, Path=IsChecked, Converter={StaticResource legendConverter}}"/> 
  </Grid> 
  <ContentPresenter Height="Auto" Width="Auto" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/> 
 </Grid> 
</ControlTemplate> 

<
Style x:Key="_chartLegendStyle" TargetType="{x:Type telerik:ChartLegend}"
 <Setter Property="Template"
   . 
   . 
   . 
 <Setter.Value> 
 <Setter Property="ItemsPanel"
  <Setter.Value> 
   <ItemsPanelTemplate > 
    <StackPanel IsItemsHost="True" Orientation="Horizontal"/> 
   </ItemsPanelTemplate> 
  </Setter.Value> 
 </Setter> 
 <Setter Property="HeaderTemplate"
    . 
    . 
    . 
 </Setter> 
</Style> 

Everything works fine except the height of the legend. In both cases the height is filled to any fixed size. I want to set the height of the legend to auto that it just uses the space it needs. Therefore I tried to override the VerticalAlignment to Center as the MinHeight to 100 but nothing seems to be working.

Maybe this is the same issue I have with the size of the chart it self. I am not able to stlye the view that contains the chart that it shrinks with the window. Growing seems to have no problem but shrinking is not possible. (Defaultsize of the chart is around 600x800)
Giuseppe
Telerik team
 answered on 28 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?