Telerik Forums
UI for WPF Forum
1 answer
144 views

Hi,

I have downloaded a demo/trial of WPF Controls (which look very promising btw). Unfortunately, an issue with my setup of Visual Studio prevents me from using the controls or even making a WPF app, without Telerik Controls.

If I use Expression Blend 2, can I use these controls in Blend? Eg can I drag them from a toolbox in Blend to the canvas?

Thanks

Boyan
Telerik team
 answered on 01 Jun 2009
1 answer
103 views
Hello,

I have a windows desktop app that's using the Telerik WPF controls.  I was wondering if there is anything special I need to do when deploying to a client's computer.  I'm going to be releasing this product soon, and I wanted to make sure that I setup the deployment correctly.

Thanks.
Hristo Deshev
Telerik team
 answered on 01 Jun 2009
2 answers
501 views
Hi,

What I am trying to achieve is this: Depending what I am bound to, the cell in edit mode will display different types of controls i.e a checkbox, combobox, TextBox etc.. Looking at the ControlTemplate named 'EditTemplate', below, is incorrect because you cannot have a DataTemplate as a child of a border. In the Microsoft data grid world you have something called a CellEditingTemplate, where a DataTemplate is permissible. I see in your grid you have something named a CellEditTemplate, but, alas, I could not find any examples/documentation to view this object.

so....

1. Am I correct to use a style (named UDFCellViewStyle) with a trigger to determine if the grid is in edit mode
2. Can I use  the CellEditTemplate instead of a style trigger
3. How can I use my datatemplate for your cell in Edit mode
 <LocalFramework:UDFValueConverter  x:Key="UDFValueConverter" /> 
          
        <Style x:Key="ComboStyleUDFMultipleSelect" TargetType="{x:Type ComboBox}">  
            <Setter Property="ItemTemplate">  
                <Setter.Value> 
                    <DataTemplate> 
                        <StackPanel Orientation="Horizontal">  
                            <CheckBox  x:Name="chkSelected" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>  
                            <TextBlock Text="{Binding Path=Value}" TextWrapping="Wrap" x:Name="txtListValue" Margin="2,0,0,0"/>  
                        </StackPanel> 
                    </DataTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
          
        <ControlTemplate  x:Key="NormalTemplate" TargetType="telerikGridView:GridViewCell">  
            <Border BorderThickness="{TemplateBinding BorderThickness}"   
                                            BorderBrush="{TemplateBinding BorderBrush}"   
                                            Background="LightGreen" > 
                <TextBlock Text="{Binding Converter={StaticResource UDFValueConverter}}" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}" /> 
            </Border> 
        </ControlTemplate> 
          
        <ControlTemplate x:Key="EditTemplate" TargetType="telerikGridView:GridViewCell">  
            <Border BorderThickness="{TemplateBinding BorderThickness}"   
                                            BorderBrush="{TemplateBinding BorderBrush}"   
                                            Background="{TemplateBinding Background}">  
               <DataTemplate> 
                    <StackPanel x:Name="sp_Value" Orientation="Vertical" > 
                        <toolkit:DatePicker x:Name="dpValue" Visibility="Collapsed"   SelectedDateFormat="Short" /> 
                        <TextBox  x:Name="txtValue"  Visibility="Collapsed"  /> 
                        <ComboBox  x:Name="cboValue" Visibility="Collapsed" DisplayMemberPath="Value" SelectedItem="{Binding CityInfo, Mode=TwoWay}"  ItemsSource="{Binding UDFListValues, Source={StaticResource CMXLookUPsDS}}"></ComboBox> 
                        <CheckBox x:Name="chkValue" Visibility="Collapsed"></CheckBox> 
                </StackPanel> 
                    <DataTemplate.Triggers> 
                        <DataTrigger Binding="{Binding Path=UDF.UDFDataType.Name}" Value="System.String">  
                            <Setter TargetName="txtValue" Property="Visibility" Value="Visible"></Setter> 
                        </DataTrigger> 
                        <MultiDataTrigger> 
                            <MultiDataTrigger.Conditions> 
                                <Condition Binding="{Binding Path=UDF.UDFDataType.Name}" Value="System.Collections.ArrayList" /> 
                                <Condition Binding="{Binding Path=UDF.MultpleSelect}" Value="true" /> 
                            </MultiDataTrigger.Conditions> 
                            <Setter TargetName="cboValue" Property="Visibility" Value="Visible" /> 
                            <Setter TargetName="cboValue" Property="Style" Value="{StaticResource ComboStyleUDFMultipleSelect}"  /> 
                        </MultiDataTrigger> 
 
                        <MultiDataTrigger> 
                            <MultiDataTrigger.Conditions> 
                                <Condition Binding="{Binding Path=UDF.UDFDataType.Name}" Value="System.Collections.ArrayList" /> 
                                <Condition Binding="{Binding Path=UDF.MultpleSelect}" Value="false" /> 
                            </MultiDataTrigger.Conditions> 
                            <Setter TargetName="cboValue" Property="Visibility" Value="Visible"></Setter> 
                        </MultiDataTrigger> 
 
                        <DataTrigger Binding="{Binding Path=UDF.UDFDataType.Name}" Value="System.Boolean">  
                            <Setter TargetName="chkValue" Property="Visibility" Value="Visible"></Setter> 
                        </DataTrigger> 
                        <DataTrigger Binding="{Binding Path=UDF.UDFDataType.Name}" Value="System.DateTime">  
                            <Setter TargetName="dpValue" Property="Visibility" Value="Visible"></Setter> 
                        </DataTrigger> 
                    </DataTemplate.Triggers> 
                </DataTemplate> 
                      
                
            </Border> 
        </ControlTemplate> 

 

 

<Style x:Key="UDFCellViewStyle" TargetType="telerikGridView:GridViewCell">

 

 

 

<Style.Triggers>

 

 

 

<Trigger Value="False" Property="IsInEditMode">

 

 

 

<Setter Property="telerik:GridViewCell.Template" Value="{StaticResource NormalTemplate}"/>

 

 

 

</Trigger>

 

 

 

<Trigger Value="True" Property="IsInEditMode">

 

 

 

<Setter Property="telerik:GridViewCell.Template" Value="{StaticResource EditTemplate}"/>

 

 

 

</Trigger>

 

 

 

</Style.Triggers>

 

 

 

</Style>

 


Thanks

P
Nedyalko Nikolov
Telerik team
 answered on 30 May 2009
11 answers
190 views
HI Telerik Team

                  i developed a component using Telerik SilverlightControl 

used components are

Rad docking panel
GridView
Drag and Drop
TreeView

Then we  are planned to develop the same component in WPF
as far as i understood XAML  is same for both wpf and silverlight  but in this scenario bothe diff assemblies
i can not able to migrate  to wpf , so i took corresponding dll (WPF ) and did
in my future plan is need to all the controls WPF and Silverlight   is it possible ?
then only we can buy Telerik Controls . because my product is huge  .
depends on the client we are changing WPF and Silverlight  so need support .
already i seen forum in future release planning to support both in one DLL
when can i except that release
please let me know  because  i need to talk to the management after your Replay

Thanks and Regards
Murugan




Valentin.Stoychev
Telerik team
 answered on 30 May 2009
1 answer
128 views
Hi

Given the code below, when the Grid is rendered, there is no filter icon on the column. Can you tell me what else I need to do to get the filter icon (therefore enabling filtering) to appear on a dynamic column.

 Dim UDFCellStyle As Windows.Style = Me.FindResource("UDFCellViewStyle")  
 
        For Each UDFItem In Me.CMXEvent.UDFItems  
            Dim UDFColumn As New Telerik.Windows.Controls.GridViewDataColumn  
            UDFColumn.CellStyle = UDFCellStyle  
            UDFColumn.HeaderText = UDFItem.UDF.Name  
            UDFColumn.IsFilterable = True 
            UDFColumn.DataContext = UDFItem  
            Me.grdMembers.Columns.Add(UDFColumn)  
 
        Next 


Thanks


P
Stefan Dobrev
Telerik team
 answered on 30 May 2009
1 answer
114 views
Hi,
    I am using "radcarousel".
    its working fine when i am using "forward/backward" arrow key and also working fine if using "Pageup/Pagedown" key.
    But its throwing Exception when I am using "Home /End" Key.
    Even Try/Catch block also unable to handle this exception.

    Exception Detail as mentioned:

    System.Overflow Exception
    Value was either too large or too small for an Int32.

    Please help me to resolve this exception.

Thanks & Regards,
Durgesh Tripathi.
Vlad
Telerik team
 answered on 29 May 2009
1 answer
484 views

I am trying to place to buttons in the expander header but I want them to be aligned to the right side of the expander header. However, the contents of the header do not take up the entire size of the header, they only take up the minimum space necessary to draw the controls in the header.
Here is what I have:

 

 

 

 

<telerik:RadExpander>

 

 

 

 

<telerik:RadExpander.Header>

 

 

 

 

<Grid Margin="5">

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

<ColumnDefinition Width="5*"/>

 

 

 

 

<ColumnDefinition Width="5*"/>

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

<Button HorizontalAlignment="Left" Content="Click Me" />

 

 

 

 

<Button Grid.Column="1" HorizontalAlignment="Right" Content="Click Me" />

 

 

 

 

</Grid>

 

 

 

 

</telerik:RadExpander.Header>

 

 

 

 

<TextBlock Text="This is a test of the telerik expander control." />

 

 

 

 

</telerik:RadExpander>

 

 

 

 

So I get
\/ Click Me Click Me                                        
This is a test of the telerik expander control

And I want this
\/ Click Me                                         Click Me
This is a test of the telerik expander control


I can get it to work with the following hack but I was hoping this would not be necessary.

 

 

 

<Grid>

 

 

 

<TextBox Margin="30,0,0,0" Height="1" Name="_hiddenWidthControl" />

 

 

 

<telerik:RadExpander IsExpanded="True">

 

 

 

<telerik:RadExpander.Header>

 

 

 

<StackPanel Width="{Binding ElementName=_hiddenWidthControl, Path=ActualWidth}">

 

 

 

<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

 

 

 

<Button HorizontalAlignment="Right" Content="Click Me" />

 

 

 

<Button Grid.Column="1" HorizontalAlignment="Right" Content="Click Me" />

 

 

 

</StackPanel>

 

 

 

</StackPanel>

 

 

 

</telerik:RadExpander.Header>

 

 

 

<TextBlock Text="This is a test of the telerik expander control." />

 

 

 

</telerik:RadExpander>

 

 

 

</Grid>

 

 

 

Thanks,

Billy Jacobs

Dimitrina
Telerik team
 answered on 29 May 2009
3 answers
232 views
Is there an easy way to return all the times in the treeview in one statement?  I have a treeview that I manually load through code that is 5-6 levels deep with checkboxes.  I then need to go through every item in the Treeview and check if it is checked or not and update the database.  It doesn't matter what order it goes in.  Right now, i am looping through each level then looping through the children and it is very slow.  Is there a more efficient way of looping through all items and getting the checkstate?

 

foreach (RadTreeViewItem item in treeColumns.Items)

 

{

 

DataAccess.ctx.ExecuteCommand("Update WorkFlow Set SortOrder=" + lOrder.ToString() + " Where ItemID='" + new Guid(item.Tag.ToString()) + "'");

 

RecursiveItems(item);

lOrder++;

}

 

private

 

void RecursiveItems(RadTreeViewItem treeitem)

 

{

 

int lOrder = 1;

 

 

foreach (RadTreeViewItem item in treeitem.Items)

 

{

 

DataAccess.ctx.ExecuteCommand("Update WorkFlow Set SortOrder=" + lOrder.ToString() + " Where ItemID='" + new Guid(item.Tag.ToString()) + "'");

 

 

if (item.Items.Count > 0)

 

{

RecursiveItems(item);

}

lOrder++;

}

 

DataAccess.ctx.SubmitChanges();

 

}

Miroslav
Telerik team
 answered on 29 May 2009
1 answer
40 views
Hi,

     i have used "telerik:RadCarousel".
     it will navigate forward or backword using arrow keys automatically.
     but when i press HOME or END key then it is throwing an exception(System.overflowexception).

      i am not even able to handle this error using try... catch.

Please help.

thanks,
Sachin M. Powar
    
Vlad
Telerik team
 answered on 29 May 2009
3 answers
169 views
Hello.

OK, so I'm a designer (don't all run away).  I work in Blend 98% of the time, VS very rarely.  I've downloaded the WPF demo and have been asked to trial it to see if it's worth having, I think the idea is if us designers can work it we'll all be ok.

So, basically, can the Rad Tools for WPF be used directly in Blend or is it a VS job after we've made the UI?  If you can use it directly in Blend, are there any tutorials?

Regards, A.
Kalin Milanov
Telerik team
 answered on 29 May 2009
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?