Telerik Forums
UI for WPF Forum
2 answers
402 views
Hi,

Is it possible to bind to the collection of selected dates / how would I use the selected dates in my view model?

thanks

David
Anthony
Top achievements
Rank 1
 answered on 26 Nov 2013
1 answer
176 views
I was trying to apply a nested style on a RadToolbar and on its children. I had problems applying the style to certain children like RadButtons and RadToggleButtons. The same occurs with normal WPF Toolbars:

http://stackoverflow.com/questions/20219595/wpf-why-are-nested-styles-not-always-working/20220084?noredirect=1#20220084

The solution is, that you have to override the special style, that the Toolbar defines for Buttons, ToggleButtons etc. For this you need the Toolbar's ToggleButtonStyle Resourcekey which is provided by a normal WPF Toolbar via

public static ResourceKey ToggleButtonStyleKey { get; }
Where do I find this resource Key on a RadToolBar and how do I apply a nested style on all RadButtons/RadToggleButtons of  a RadToobar?
Petar Mladenov
Telerik team
 answered on 26 Nov 2013
1 answer
117 views
There exists an event on the editor called PrintCompleted, that I can use to know when my print operation has completed. I need this notification so my viewmodel can navigate away from the document that was edited. So far so good. The problem lies when the user hits the print dialog's "cancel" button. I need to be able to know if that happens because there are still things I need to do. Since there is no "PrintCancelled" event, how will I ever know the user cancelled that operation from the system print dialog? Is there even a way?

Thanks in advance!
Petya
Telerik team
 answered on 26 Nov 2013
0 answers
98 views
Hello,

i use RadGridView and want to set a GridViewDataColumn using CellTemplateSelector. I have used the DataMemberBinding to bind the property, but my selector gets only the whole item data.
ex. i have ViewModel MyVM and some properties. One of them named Status. And the xaml code like below.

<telerik:GridViewDataColumn Width="40" ColumnGroupName="status" Header="Header"
 DataMemberBinding="{Binding Status}" SortMemberPath="Status"
 CellTemplateSelector="{StaticResource myDataTemplateSelector}"/>

The item in myDataTemplateSelector ist always MyVM instead of MyVM.Status.
Any idea? Thanks!

Ivan
Ivan
Top achievements
Rank 1
 asked on 26 Nov 2013
5 answers
87 views
Hi,

In ClassDiagram (Telerik demo) after expand node solution explorer treeview icons not correct show, Please see attached image.

Thanks in advance.
Petar Mladenov
Telerik team
 answered on 26 Nov 2013
1 answer
114 views
Hi,
I wanted to apply Custom style to the month button of the raddatepicker when user has moved to month mode. it is currently is showing orange border with a month button in it. How can I change that to use my custom color? 
Thanks
Kalin
Telerik team
 answered on 26 Nov 2013
0 answers
106 views
Hi,

I created a AutoCompleteBox inside a radwindow, it functions well except the cursor not appear.

Saravanan
Saravanan
Top achievements
Rank 1
 asked on 26 Nov 2013
2 answers
148 views
RadDiagramTextShape seems to only centre its text content.  Is it possible to change the alignment to include either: left, right or stretch?
The control doesn't seem to respond to the HorizontalContentAlignment or even the HorizontalAlignment property.

Can anyone help me please?



Chris
Top achievements
Rank 1
 answered on 26 Nov 2013
0 answers
151 views
Hi,

I have a RadGridView bound to a large DataTable. Changing data in one row of that DataTable does not trigger a refresh of the RadGridView - the DataTable changes are not reflected in the UI. I have tried the following:

RadGridView.ItemsSource = null;
RadGridView.ItemsSource = GridDataTable;

or:
RadGridView.Items.Refresh();

or:
RadGridView.Rebind();

Each takes a very long time, presumably because the entire DataTable is being reloaded into the grid view. Is there any way to refresh only the DataRow that has changed?
Mark
Top achievements
Rank 1
 asked on 25 Nov 2013
1 answer
125 views
Hi I have problem, when I set up HorizontalGridLinesBrush to my grid, it gets blurred (when I set top margin to 32 everything is fine)

here is my caml grid row setup:

<ControlTemplate x:Key="GridViewRowTemplate" TargetType="grid:GridViewRow">
        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused" />
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicator" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected" />
                    <VisualState x:Name="SelectedUnfocused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <SolidColorBrush Color="#FF9c9c9c"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <SolidColorBrush Color="#FF9c9c9c"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation To="1" Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Opacity)" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver">
                        <!--Bez najeti mysi-->
                    </VisualState>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValueStates">
                    <VisualState x:Name="RowValid" />
                    <VisualState x:Name="RowInvalid">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ErrorIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="EditStates">
                    <VisualState x:Name="ReadOnlyMode" />
                    <VisualState x:Name="EditMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <grid:SelectiveScrollingGrid x:Name="grid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Border x:Name="SelectionBackground" Grid.Column="2" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" />
                <Rectangle x:Name="Background_Over" Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}" Opacity="0.1" Grid.ColumnSpan="4" Visibility="Collapsed" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" />
                <Rectangle x:Name="Background_Selected" Fill="#FF9c9c9c" Visibility="Collapsed" Margin="0,0,0,0" Grid.ColumnSpan="4" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                <!--Ramecek pro erroru-->
                <Rectangle x:Name="Background_Invalid" Stroke="#FFe56060" Fill="White" StrokeThickness="1" Grid.ColumnSpan="4" Visibility="Collapsed" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" />
                <controls:GridViewToggleButton Grid.Column="2" x:Name="PART_HierarchyExpandButton" Width="25" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Opacity="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToOpacityConverter}}" IsHitTestVisible="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="{TemplateBinding IsTabStop}" />
                <Border Grid.Column="2" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}" />
                <grid:DataCellsPresenter Grid.Column="3" x:Name="PART_DataCellsPresenter" />
                <Border x:Name="PART_RowBorder" SnapsToDevicePixels="True"  ClipToBounds="False" BorderBrush="{TemplateBinding HorizontalGridLinesBrush}" BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}" Grid.ColumnSpan="4" Grid.Column="1" Grid.RowSpan="4" VerticalAlignment="Bottom" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" />
                <Border Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="2" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                    <ContentPresenter x:Name="PART_HierarchyChildPresenter" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" Visibility="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}" />
                </Border>
                <grid:DetailsPresenter x:Name="PART_DetailsPresenter" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" DetailsProvider="{TemplateBinding DetailsProvider}" />
                <Border x:Name="PART_IndicatorPresenter" Width="25" VerticalAlignment="Stretch" Visibility="{TemplateBinding RowIndicatorVisibility}" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Grid.RowSpan="3" Background="{telerik:Windows8Resource ResourceKey=MainBrush}" BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}" BorderThickness="0,0,1,0">
                    <Grid>
                        <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="9" Height="9" Visibility="Collapsed">
                            <Path x:Name="plus" Stretch="Fill" Width="8" Height="4" Data="M0,0 L8,2.3841858E-07 L4,4 z" RenderTransformOrigin="0.5,0.5" Fill="{telerik:Windows8Resource ResourceKey=AccentBrush}" StrokeThickness="{TemplateBinding BorderThickness}" Margin="{TemplateBinding Padding}">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="0" />
                                        <SkewTransform />
                                        <RotateTransform Angle="90" />
                                        <TranslateTransform X="9.5006054579016563E-08" Y="-4.6599587300022449E-08" />
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Grid>
                        <Border x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="12" Height="10" Visibility="Collapsed" Background="{telerik:Windows8Resource ResourceKey=MainBrush}" BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}" BorderThickness="0">
                            <Path Fill="Transparent" Stretch="Fill" Data="M3,2 L4,2 L5,2 L6,2 L6,3 L5,3 L5,4 L5,5 L5,6 L5,7 L6,7 L6,8 L5,8 L4,8 L3,8 L3,7 L4,7 L4,6 L4,5 L4,4 L4,3 L3,3 z" HorizontalAlignment="Left" Margin="0,0,0,0" Width="3" Height="6" />
                        </Border>
                        <!--Error pri spatnem vyplneni-->
                        <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                            <Ellipse Fill="{telerik:Windows8Resource ResourceKey=MainBrush}" Width="16" Height="16" Stroke="#FFe56060" />
                            <Path Data="M1.0000001,8 C1.5522848,8 2.0000002,8.4477148 2.0000002,9 C2.0000002,9.5522842 1.5522848,10 1.0000001,10 C0.4477154,10 1.527369E-07,9.5522842 1.4901161E-07,9 C1.527369E-07,8.4477148 0.4477154,8 1.0000001,8 z M0,0 L2,0 L2,7 L0,7 z" Fill="#FFe56060" Width="2" Height="10" Stretch="Fill" />
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" Placement="Bottom" Content="{TemplateBinding Errors}"></ToolTip>
                            </ToolTipService.ToolTip>
                        </Grid>
                        <Border x:Name="PART_RowResizer" Background="Transparent" Height="4" VerticalAlignment="Bottom" Cursor="SizeNS" />
                    </Grid>
                </Border>
                <grid:IndentPresenter x:Name="PART_IndentPresenter" IndentLevel="{TemplateBinding IndentLevel}" Grid.Column="1" Grid.RowSpan="4" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" />
 
            </grid:SelectiveScrollingGrid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GridViewRowStyle" TargetType="grid:GridViewRow">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template" Value="{DynamicResource GridViewRowTemplate}" />
        <Setter Property="Background" Value="#FF8a8a8a" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="AllowDrop" Value="True" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="SnapsToDevicePixels" Value="False" />
    </Style>
    <Style TargetType="grid:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}" />

Vanya Pavlova
Telerik team
 answered on 25 Nov 2013
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?