Telerik Forums
UI for WPF Forum
13 answers
2.1K+ views
Hi

I am getting the above error trying to implement one of your WPF examples.

Please can you tell me where I am going wrong.

I am trying to implement a simple Carousel.

Muy code is ...
<Window x:Class="frmMain" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="dareSOFT OST2PST Conversion Utility" Height="300" Width="402" MinWidth="402" MinHeight="300" xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation">  
    <Grid> 
        <my:RadCarousel Name="rcMenu" AutoGenerateDataPresenters="True" HorizontalAlignment="Stretch" Cursor="Arrow">  
            <my:RadCarousel.BitmapEffectInput> 
                <BitmapEffectInput /> 
            </my:RadCarousel.BitmapEffectInput> 
            <my:RadCarousel.BitmapEffect> 
                <BlurBitmapEffect /> 
            </my:RadCarousel.BitmapEffect> 
            <Style TargetType="{my:Type telerik:CarouselDataRecordPresenter}">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="{my:Type telerik:CarouselDataRecordPresenter}">  
                            <Grid IsHitTestVisible="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="30" /> 
                                    <RowDefinition Height="100" /> 
                                    <RowDefinition Height="Auto" /> 
                                </Grid.RowDefinitions> 
                                <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" > 
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>  
                                </StackPanel> 
                                <Rectangle Grid.Row="1" RadiusX="3" RadiusY="3" Width="110" Height="80">  
                                    <Rectangle.Fill> 
                                        <ImageBrush x:Name="brush" ImageSource="{Binding Path=Fields[Picture].Value}"/>  
                                    </Rectangle.Fill> 
                                </Rectangle> 
                                <StackPanel Grid.Row="2"  Orientation="Horizontal" VerticalAlignment="Center">  
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>  
                                </StackPanel> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </my:RadCarousel> 
    </Grid> 
</Window> 
 

Kind Regards

David
Milan
Telerik team
 answered on 03 Jun 2009
1 answer
136 views
Evaluating the Telerik controls and so far so good.  Just wondering if the RadPanelBar implements fully the IsTextSearchEnabled?  I have a PanelBar setup and bound to a List<CustomObject>.  Furthermore, I have setup a HierarchialDataTemplate.  In this example, CustomObject exposes a property named ItemDescription.  I have overridden the ToString method of the class to return ItemDescription and I have set (on the PanelBar) TextSearch.TextPath="ItemDescription"

However, none of this appears to work.

Thanks,
David
Miroslav
Telerik team
 answered on 03 Jun 2009
3 answers
196 views
Hi,
I am using custom sorting.
I've tried to follow some suggestions in other thread regarding the use of Loaded event to set the initial sorting state for my columns.

void GenWiseRadGrid_Loaded(object sender, RoutedEventArgs e)
        {
            if (ItemsControl != null)
            {
                Sorting += GenWiseRadGrid_Sorting;

                if (DataContext != null)
                    ApplySortToGrid(BaseProvider.DefaultSort);
            }
        }

        private void ApplySortToGrid(ISort pSort)
        {
            if (pSort == null) throw new ArgumentNullException("pSort");

            var name = BaseProvider.DefaultSort.DataProperty.PropertyName;
            var column = Columns[name];

            column.SortingState = BaseProvider.DefaultSort.Order.IsAscending ? SortingState.Ascending : SortingState.Descending;
            column.HeaderText = "test";

the ApplySortToGrid gets called, but the control does not repaint/refresh.

I've tried :
  InvalidateVisual();
            InvalidateArrange();
            UpdateLayout();

           
Nothing seems to get the control to repaint/ refresh...




We are not using SortDescriptions
if (SortDescriptions.Count > 0) throw new Exception("WE SHOULD NOT USE SORT DESCRIPTORS");

  <telerik:GridViewDataColumn HeaderText="Category Name" UniqueName="Category_name"
                                                    IsCustomSortingEnabled="True"
                                                    DataMemberBinding="{Binding Category.Category_name}"                                                >
                        </telerik:GridViewDataColumn>

Also I've noticed that the data is STILL sorted internally (so i return a list in a certain order but the grid will show it desc). I am doing the DESC already internally in my SQL engine .

Any idea???


Vlad
Telerik team
 answered on 03 Jun 2009
1 answer
198 views
Is there a way to hide the first column that shows the cursor?
Vlad
Top achievements
Rank 1
 answered on 03 Jun 2009
3 answers
58 views
Hi,
Here is my problem. I have 2 forms. In my second form I read data in my gridView. And when i deleting some rows in gridview that also delete in my database, but when i'm closing and opening again second form. In the gridView stay the old data, before deleted.

Please help me

Thanks
Vlad
Telerik team
 answered on 01 Jun 2009
1 answer
121 views
Hi

When the CellEditEnded event is fired I require to access the templated control where the editing occurred

Thanks

P
Nedyalko Nikolov
Telerik team
 answered on 01 Jun 2009
1 answer
188 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
132 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
587 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
242 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
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?