Telerik Forums
UI for WPF Forum
2 answers
106 views
Hi ,
I am trying to display hiearchial data in the gridview . Please see the attached screenshot .
The parent level can have multiple child elements which themselves can be hiearchial.
I have used ChildTableDefinition and HiearchyChildTemplate, but how do I specify different HieararchyChildTemplate for different subitems ?
Subarna Bandyopadhya
Top achievements
Rank 1
 answered on 22 Mar 2011
5 answers
257 views
Hi,

I want to customize the Appointment Item. Therefore I proceeded as described in http://www.telerik.com/help/wpf/radscheduleview-styles-and-templates-appointment-style.html. But after creating the AppointmentStyleSelector nothing happens when I doubleclick an appointment. What went wrong? Are there any triggers missing? Below is the XAML which was generated by Expression Blend (4). I'm using Q1 2011 telerik controls.

thanks in advance,

michael


<telerik:OrientedAppointmentItemStyleSelector x:Key="AppointmentStyleSelector">
          <telerik:OrientedAppointmentItemStyleSelector.HorizontalStyle>
              <Style TargetType="{x:Type telerik:AppointmentItem}">
                  <Setter Property="Margin" Value="0,1,0,0"/>
                  <Style.BasedOn>
                      <Style TargetType="{x:Type telerik:AppointmentItem}">
                          <Setter Property="Background">
                              <Setter.Value>
                                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                      <GradientStop Color="White"/>
                                      <GradientStop Color="#FFD4D4D4" Offset="1"/>
                                  </LinearGradientBrush>
                              </Setter.Value>
                          </Setter>
                          <Setter Property="BorderBrush" Value="#FF848484"/>
                          <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                          <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                          <Setter Property="Foreground" Value="Black"/>
                          <Setter Property="BorderThickness" Value="1"/>
                          <Setter Property="Padding" Value="2,0,0,0"/>
                          <Setter Property="Focusable" Value="True"/>
                          <Setter Property="ContentTemplateSelector">
                              <Setter.Value>
                                  <telerik:AppointmentItemContentTemplateSelector>
                                      <telerik:AppointmentItemContentTemplateSelector.DefaultTemplate>
                                          <DataTemplate>
                                              <TextBlock TextWrapping="Wrap" Text="{Binding Subject}" TextTrimming="WordEllipsis"/>
                                          </DataTemplate>
                                      </telerik:AppointmentItemContentTemplateSelector.DefaultTemplate>
                                  </telerik:AppointmentItemContentTemplateSelector>
                              </Setter.Value>
                          </Setter>
                          <Setter Property="Template">
                              <Setter.Value>
                                  <ControlTemplate TargetType="{x:Type telerik:AppointmentItem}">
                                      <Grid x:Name="Root">
                                          <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2">
                                              <Border BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1"/>
                                          </Border>
                                          <Border x:Name="CommonStatesVisual" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Visibility="Collapsed">
                                              <Border.Background>
                                                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                      <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                                      <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                                  </LinearGradientBrush>
                                              </Border.Background>
                                              <Border x:Name="CommonStatesVisualInnerBorder" BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1"/>
                                          </Border>
                                          <Border x:Name="PART_Category" Background="{Binding Category.CategoryBrush}" Margin="2"/>
                                          <Rectangle x:Name="ReadOnlyVisual" Fill="#B2BABFC6" Margin="2" Visibility="Collapsed"/>
                                          <Grid Margin="2">
                                              <Grid.ColumnDefinitions>
                                                  <ColumnDefinition Width="Auto"/>
                                                  <ColumnDefinition Width="Auto"/>
                                                  <ColumnDefinition Width="*"/>
                                              </Grid.ColumnDefinitions>
                                              <Border x:Name="PART_TimeMarker" Background="{Binding TimeMarker.TimeMarkerBrush}" Grid.Column="0" HorizontalAlignment="Left" Width="5">
                                                  <Border.Visibility>
                                                      <Binding Path="TimeMarker">
                                                          <Binding.Converter>
                                                              <telerik:NullToVisibilityConverter/>
                                                          </Binding.Converter>
                                                      </Binding>
                                                  </Border.Visibility>
                                              </Border>
                                              <StackPanel Grid.Column="1" Margin="0,3,0,0" VerticalAlignment="Top">
                                                  <Image x:Name="RecurrenceMark" Grid.Column="0" HorizontalAlignment="Left" Height="10" Margin="2,1,1,0" Width="10">
                                                      <Image.Source>
                                                          <BitmapImage UriSource="pack://application:,,,/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentException.png"/>
                                                      </Image.Source>
                                                      <Image.Visibility>
                                                          <Binding Path="RecurrenceState">
                                                              <Binding.Converter>
                                                                  <telerik:RecurrenceStateIsExeptionToVisibilityConverter/>
                                                              </Binding.Converter>
                                                          </Binding>
                                                      </Image.Visibility>
                                                  </Image>
                                                  <Image x:Name="ExceptionMark" Grid.Column="0" HorizontalAlignment="Left" Height="10" Margin="2,1,1,0" Width="10">
                                                      <Image.Source>
                                                          <BitmapImage UriSource="pack://application:,,,/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentRecurrence.png"/>
                                                      </Image.Source>
                                                      <Image.Visibility>
                                                          <Binding Path="RecurrenceState">
                                                              <Binding.Converter>
                                                                  <telerik:RecurrenceStateIsOccurenceToVisibilityConverter/>
                                                              </Binding.Converter>
                                                          </Binding>
                                                      </Image.Visibility>
                                                  </Image>
                                              </StackPanel>
                                              <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="2" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                          </Grid>
                                          <Grid x:Name="MouseOverOverlay" Opacity="0" Visibility="Collapsed">
                                              <Border x:Name="PART_StartResizeGrip" telerik:RadDragAndDropManager.AllowDrag="True" Background="Transparent" Cursor="SizeWE" HorizontalAlignment="Left" VerticalAlignment="Stretch">
                                                  <StackPanel x:Name="StartResizeGrip" HorizontalAlignment="Center" Margin="1" VerticalAlignment="Center">
                                                      <Border BorderBrush="#FF444444" BorderThickness="0,0,1,1" Background="White" Height="3" Margin="1" Width="3"/>
                                                      <Border BorderBrush="#FF444444" BorderThickness="0,0,1,1" Background="White" Height="3" Margin="1" Width="3"/>
                                                      <Border BorderBrush="#FF444444" BorderThickness="0,0,1,1" Background="White" Height="3" Margin="1" Width="3"/>
                                                  </StackPanel>
                                              </Border>
                                              <Border x:Name="PART_EndResizeGrip" telerik:RadDragAndDropManager.AllowDrag="True" Background="Transparent" Cursor="SizeWE" HorizontalAlignment="Right" VerticalAlignment="Stretch">
                                                  <StackPanel x:Name="EndResizeGrip" HorizontalAlignment="Center" Margin="1" VerticalAlignment="Center">
                                                      <Border BorderBrush="#FF444444" BorderThickness="0,0,1,1" Background="White" Height="3" Margin="1" Width="3"/>
                                                      <Border BorderBrush="#FF444444" BorderThickness="0,0,1,1" Background="White" Height="3" Margin="1" Width="3"/>
                                                      <Border BorderBrush="#FF444444" BorderThickness="0,0,1,1" Background="White" Height="3" Margin="1" Width="3"/>
                                                  </StackPanel>
                                              </Border>
                                              <telerik:RadButton x:Name="DeleteButton" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" Command="telerik:RadScheduleViewCommands.DeleteAppointment" HorizontalAlignment="Right" Height="11" Margin="5" Padding="0" VerticalAlignment="Top" Width="11">
                                                  <telerik:StyleManager.Theme>
                                                      <telerik:Office_BlackTheme/>
                                                  </telerik:StyleManager.Theme>
                                                  <Path Data="M0,0L5,5 M5,0L0,5" Stroke="#FF444444"/>
                                              </telerik:RadButton>
                                          </Grid>
                                      </Grid>
                                      <ControlTemplate.Triggers>
                                          <MultiTrigger>
                                              <MultiTrigger.Conditions>
                                                  <Condition Property="IsReadOnly" Value="True"/>
                                                  <Condition Property="IsEnabled" Value="True"/>
                                              </MultiTrigger.Conditions>
                                              <Setter Property="Visibility" TargetName="ReadOnlyVisual" Value="Visible"/>
                                          </MultiTrigger>
                                          <MultiTrigger>
                                              <MultiTrigger.Conditions>
                                                  <Condition Property="IsReadOnly" Value="False"/>
                                                  <Condition Property="IsMouseOver" Value="True"/>
                                                  <Condition Property="IsEnabled" Value="True"/>
                                              </MultiTrigger.Conditions>
                                              <MultiTrigger.EnterActions>
                                                  <BeginStoryboard>
                                                      <Storyboard>
                                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0.4" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverOverlay">
                                                              <DiscreteObjectKeyFrame KeyTime="0">
                                                                  <DiscreteObjectKeyFrame.Value>
                                                                      <Visibility>Visible</Visibility>
                                                                  </DiscreteObjectKeyFrame.Value>
                                                              </DiscreteObjectKeyFrame>
                                                          </ObjectAnimationUsingKeyFrames>
                                                          <DoubleAnimation BeginTime="0:0:0.2" Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverOverlay"/>
                                                      </Storyboard>
                                                  </BeginStoryboard>
                                              </MultiTrigger.EnterActions>
                                              <MultiTrigger.ExitActions>
                                                  <BeginStoryboard>
                                                      <Storyboard>
                                                          <ObjectAnimationUsingKeyFrames Duration="0:0:0.2" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverOverlay">
                                                              <DiscreteObjectKeyFrame KeyTime="0:0:0.2">
                                                                  <DiscreteObjectKeyFrame.Value>
                                                                      <Visibility>Collapsed</Visibility>
                                                                  </DiscreteObjectKeyFrame.Value>
                                                              </DiscreteObjectKeyFrame>
                                                          </ObjectAnimationUsingKeyFrames>
                                                          <DoubleAnimation BeginTime="0" Duration="0:0:0.2" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverOverlay"/>
                                                      </Storyboard>
                                                  </BeginStoryboard>
                                              </MultiTrigger.ExitActions>
                                              <Setter Property="Visibility" TargetName="CommonStatesVisual" Value="Visible"/>
                                              <Setter Property="Visibility" TargetName="MouseOverOverlay" Value="Visible"/>
                                          </MultiTrigger>
                                          <Trigger Property="IsSelected" Value="True">
                                              <Setter Property="Visibility" TargetName="CommonStatesVisual" Value="Visible"/>
                                              <Setter Property="Background" TargetName="CommonStatesVisual">
                                                  <Setter.Value>
                                                      <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                          <GradientStop Color="#FFFCE79F" Offset="1"/>
                                                          <GradientStop Color="#FFFDD3A8"/>
                                                      </LinearGradientBrush>
                                                  </Setter.Value>
                                              </Setter>
                                              <Setter Property="BorderBrush" TargetName="CommonStatesVisual" Value="#FFFFC92B"/>
                                              <Setter Property="BorderBrush" TargetName="CommonStatesVisualInnerBorder" Value="White"/>
                                          </Trigger>
                                      </ControlTemplate.Triggers>
                                  </ControlTemplate>
                              </Setter.Value>
                          </Setter>
                          <Setter Property="Panel.ZIndex" Value="1"/>
                      </Style>
                  </Style.BasedOn>
              </Style>
          </telerik:OrientedAppointmentItemStyleSelector.HorizontalStyle>
Michael
Top achievements
Rank 1
 answered on 22 Mar 2011
3 answers
214 views
Depending on how I have set up my combobox, I can detect when a user selects an item.  Either the property I have bound to SelectedItem changes, or the SelectionChanged event fires.
But neither of these occur if the user selects the same item again.

Any ideas of how I can detect this?
Buzz
Valeri Hristov
Telerik team
 answered on 22 Mar 2011
3 answers
1.0K+ views
Hi,

I'm trying to use this control for user management, I am aware that you're not supposed to bind to PasswordBox field, and I do not intend to, but I would like to have the field there when you're going to insert a new user or edit a current user (in the case of edit it would be an empty text field).

How would you go about achieving this?

Thanks,
Daryl
Vanya Pavlova
Telerik team
 answered on 22 Mar 2011
3 answers
101 views
Hi 

Is following possible with telerik wpf richtextbox? Allowing only parts of document to be updateable?

http://office.microsoft.com/en-us/help/allow-changes-to-parts-of-a-protected-document-HP010082301.aspx

Thanks!

Nodir Yuldashev
Ivailo Karamanolev
Telerik team
 answered on 22 Mar 2011
4 answers
442 views
Hi,

I have installed RadControls_for_WPF_Q1_2009_DEV.msi. Then I have created a new VS 2008 WFP C# .Net 3.5 Project.
Everything works fine when I add the RadDatePicker to the Window.
  • The RadDatePicker shows up on the Window
  • Two DLLs are added to the project
    • Telerik.Windows.Controls > Version: 2009.1.312.35 > C:\Program Files\Telerik\RadControls for WPF Q1 2009\\Binaries\WPF\Telerik.Windows.Controls.dll
    • Telerik.Windows.Controls.Input > Version: 2009.1.312.35 > C:\Program Files\Telerik\RadControls for WPF Q1 2009\\Binaries\WPF\Telerik.Windows.Controls.Input.dll
  • In the XAML File

 

But now when I start the project VS tells me to find the source RadDatePicker.cs. Original location: c:\Builds\WPF_Scrum\WPF_Team\Sources\Development\Silverlight\Telerik.Windows.Controls.Input\DatePicker\RadDatePicker.cs
Which I can not find on the machine.

When I cancel this I get an Error from the InitializeComponent() function:
Error: XamlParseException occured
'Telerik.Windows.Controls.Input;;;Component\Themes\Calendar\Telerik/Calendar.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Object reference not set to an instance of an object.  Error at object 'System.Windows.ResourceDictionary'.

Thanks

 

Christian Schmidt

 

Gwynn
Top achievements
Rank 1
 answered on 22 Mar 2011
1 answer
113 views
I have added drag capabilites to one of our listviews so that appointments can be dragged to the ScheduleView using the RadDragDropManager.

RadDragAndDropManager

 

 

.SetAllowDrag(resultListView, true);

 

 

 

 

RadDragAndDropManager.AddDragQueryHandler(resultListView, OnDragQuery);

 


For the most part everythiing works, but when I grab the scrollbar thumb on the listview and drag it down, it starts a drag operation on the selected listviewitem instead of scrolling down. Also happens when tryng to resize the listview columns.

Any idea how I can get this to react only when dragging the listviewitem within the listview?

Rod
Valeri Hristov
Telerik team
 answered on 22 Mar 2011
4 answers
300 views
Hello everyone,

we have a simple RadGridView with one column bound to a enum property of a view model with a converter:

<telerik:GridViewDataColumn DataMemberBinding="{Binding SomeValue, Converter={StaticResource TestConverter}}" />

ViewModel:

public class TestViewModel {
    public TestEnum SomeValue { get; set; }
}
public enum TestEnum {
    A,
    B,
    C
}

And the converter code simply translates the bound enum value to a more readable text:

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
    var test = (TestEnum)value;
    switch (test) {
        case TestEnum.A: return "TestEnum with Value A";
        case TestEnum.B: return "TestEnum with Value B";
        case TestEnum.C: return "TestEnum with Value C";
    }
    throw new NotImplementedException();
}

The grid is rendered correctly ("TestEnum with Value A"), but all drop downs located in the extended filter are using the raw values ("A", "B", "C") of our enum and not the transformed values for our converter.

Is there a way to work around this issue (beside translating the values prior to binding, i.e. coding a seconding property and doing the translation without a converter)?

Version: RadControls for WPF Q1 2011

FYI - I can provide a simple c# test project in order to reproduce the issue if needed.

Your sincerely,

Christian
Christian
Top achievements
Rank 1
 answered on 22 Mar 2011
1 answer
75 views
I created a simple test application following the example here: http://www.telerik.com/help/wpf/raddocking-getting-started2.html
When I click on a splitter bar, the splitter jumps to the left and is no longer moveable. I have attached my project. Anyone know what's wrong?
Yana
Telerik team
 answered on 22 Mar 2011
3 answers
70 views

Hello I need to Implement selected changing and cancel the selection if need

How can I do this?

Best regard

Ehud

Yana
Telerik team
 answered on 22 Mar 2011
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?