Telerik Forums
UI for WPF Forum
1 answer
92 views
Is there an easy way to select current date and time using the control or I should make such button myself?
Miroslav Nedyalkov
Telerik team
 answered on 08 Mar 2011
1 answer
91 views

Hi,

 

I want to use the data from the database to a pie chart.

 

is it possible in WPF chart??

I found an example in reporting however I want it in WPF

http://www.telerik.com/help/reporting/buildingdatabinddatabase.html


thanks in advance

Yavor
Telerik team
 answered on 08 Mar 2011
4 answers
167 views
I have two identical  WPF RadGridViews on my form. I want to be able to detect when the GroupHeader has been clicked so that
a) Only one group on each grid is expanded at any one time
b) If the group in radGridDebits is expanded/collapsed, the same group in radGridCredits is expanded/collapsed - i.e. synchronize the group header between both grids.
c) Basically, I'm looking for a GroupHeader.Clicked event but can't find it!!

<Controls1:RadGridView Grid.Row="1"
                            x:Name="radGridDebits"
                            AutoGenerateColumns="False"
                            ShowColumnHeaders="False"
                            IsReadOnly="True"
                            ItemsSource="{Binding Data}"
                            ShowGroupPanel="False"
                            RowIndicatorVisibility="Collapsed"
                            AutoExpandGroups="False">
         <Controls1:RadGridView.SortDescriptors>
             <Data:SortDescriptor Member="HlpAccountGroup.CategoryID" />
             <Data:SortDescriptor Member="Description" />
         </Controls1:RadGridView.SortDescriptors>
         <Controls1:RadGridView.GroupDescriptors>
             <Data:GroupDescriptor Member="HlpGroupCompany.Description"
                                   DisplayContent="Group company"
                                   SortDirection="Ascending" />
         </Controls1:RadGridView.GroupDescriptors>
         <Controls1:RadGridView.FilterDescriptors>
             <Data:CompositeFilterDescriptorCollection>
                 <Data:CompositeFilterDescriptor LogicalOperator="Or">
                     <Data:FilterDescriptor Member="HlpAccountGroup.AccountType"
                                            Value="Debit" />
                     <Data:FilterDescriptor Member="HlpAccountGroup.AccountType"
                                            Value="Common" />
                 </Data:CompositeFilterDescriptor>
             </Data:CompositeFilterDescriptorCollection>
         </Controls1:RadGridView.FilterDescriptors>
         <Controls1:RadGridView.GroupHeaderTemplate>
             <DataTemplate>
                 <Border Background="{Binding Group.Items[0].HlpGroupCompany.Brush}"
                         Padding="3"
                         Width="250"
                         CornerRadius="3"
                         BorderThickness="1">
                     <StackPanel Orientation="Horizontal">
                         <TextBlock Text="Group company:"
                                    Margin="0,0,3,0" />
                         <TextBlock Text="{Binding Group.Key}"
                                    Foreground="{StaticResource DarkBackground}"
                                    FontWeight="Bold" />
                     </StackPanel>
                 </Border>
             </DataTemplate>
         </Controls1:RadGridView.GroupHeaderTemplate>
         <Controls1:RadGridView.Columns>
             <Controls1:GridViewDataColumn Header="Account"
                                           DataMemberBinding="{Binding Description}" />
             <Controls1:GridViewDataColumn Header=""
                                           DataMemberBinding="{Binding HlpCurrency.CurrencyId}" />
         </Controls1:RadGridView.Columns>
     </Controls1:RadGridView>
 
 
 
 
 
<Controls1:RadGridView Grid.Row="1"
                            x:Name="radGridCredits"
                            AutoGenerateColumns="False"
                            ShowColumnHeaders="False"
                            IsReadOnly="True"
                            ItemsSource="{Binding Data}"
                            ShowGroupPanel="False"
                            RowIndicatorVisibility="Collapsed"
                            AutoExpandGroups="False">
         <Controls1:RadGridView.SortDescriptors>
             <Data:SortDescriptor Member="HlpAccountGroup.CategoryID" />
             <Data:SortDescriptor Member="Description" />
         </Controls1:RadGridView.SortDescriptors>
         <Controls1:RadGridView.GroupDescriptors>
             <Data:GroupDescriptor Member="HlpGroupCompany.Description"
                                   DisplayContent="Group company"
                                   SortDirection="Ascending" />
         </Controls1:RadGridView.GroupDescriptors>
         <Controls1:RadGridView.FilterDescriptors>
             <Data:CompositeFilterDescriptorCollection>
                 <Data:CompositeFilterDescriptor LogicalOperator="Or">
                     <Data:FilterDescriptor Member="HlpAccountGroup.AccountType"
                                            Value="Credit" />
                     <Data:FilterDescriptor Member="HlpAccountGroup.AccountType"
                                            Value="Common" />
                 </Data:CompositeFilterDescriptor>
             </Data:CompositeFilterDescriptorCollection>
         </Controls1:RadGridView.FilterDescriptors>
         <Controls1:RadGridView.GroupHeaderTemplate>
             <DataTemplate>
                 <Border Background="{Binding Group.Items[0].HlpGroupCompany.Brush}"
                         Padding="3"
                         Width="250"
                         CornerRadius="3"
                         BorderThickness="1">
                     <StackPanel Orientation="Horizontal">
                         <TextBlock Text="Group company:"
                                    Margin="0,0,3,0" />
                         <TextBlock Text="{Binding Group.Key}"
                                    Foreground="{StaticResource DarkBackground}"
                                    FontWeight="Bold" />
                     </StackPanel>
                 </Border>
             </DataTemplate>
         </Controls1:RadGridView.GroupHeaderTemplate>
         <Controls1:RadGridView.Columns>
             <Controls1:GridViewDataColumn Header="Account"
                                           DataMemberBinding="{Binding Description}" />
             <Controls1:GridViewDataColumn Header=""
                                           DataMemberBinding="{Binding HlpCurrency.CurrencyId}" />
         </Controls1:RadGridView.Columns>
     </Controls1:RadGridView>

Many thanks
Jeremy Holt
Maya
Telerik team
 answered on 08 Mar 2011
1 answer
224 views
Hi,

I have declared the following template in my Resource File :
<DataTemplate x:Key="MenuItem">
<telerik:RadMenuItem 
                Margin="0"
                Padding="0"
                Header="{Binding Header}"
IsCheckable="{Binding IsCheckable}"
IsChecked="{Binding IsChecked, Mode=TwoWay}"
IsSeparator="{Binding IsSeparator}"
IsEnabled="{Binding IsEnabled}"
Command="{Binding MenuCommand}"
/>
        </DataTemplate>

<HierarchicalDataTemplate 
x:Key="MenuItemTemplate"
ItemsSource="{Binding MenuItems}"
ItemTemplate="{StaticResource MenuItem}">
        <telerik:RadMenuItem Header="{Binding Header}"
                             IsCheckable="{Binding IsCheckable}"
                             IsChecked="{Binding IsChecked, Mode=TwoWay}"
                             IsSeparator="{Binding IsSeparator}"
                             Margin="0"
                             Padding="0"
                             IsEnabled="{Binding IsEnabled}"
                             Command="{Binding MenuCommand}"/>
</HierarchicalDataTemplate>

And I am using the above resources in RadGridView as below:
 <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="_gridContextMenu" 
Opened="_gridContextMenu_Opened"
ItemTemplate="{StaticResource MenuItemTemplate}"
ItemsSource="{Binding ContextMenu}">
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
ContextMenu is a ObservableCollection<ContextMenuController>. 

Now Everything seems to be working except that IsSeperator doesn't work. When IsSeperator is true for a ContextMenuController it still shows as an Item occupied more space than it is supposed to be.

Look at the attached image and see how it shows the RadMenuItem which is nothing but a seperator.

Regards
Sanket
Pana
Telerik team
 answered on 08 Mar 2011
1 answer
149 views
Hi,

I'm having some very odd behaviour by using the Expression Dark resource dictionary for the BusyIndicator in my project. I had everything working perfectly with the default style and settings. I have a requirement to make the background overlay more opaque, so I attached the busy indicator resource dictionary and fired up my application ready to try and tweak it. At this point I have not changed anything in the resource dictionary, only attached it to my project. It seems that this action alone causes the BusyIndicator to fire and cover my whole window with the overlay. If I comment out the line that links the resource dictionary to my project, the problem disappears.

Does anyone have any idea why this might be?

All I want to do is make the grey overlay a little more transparent, so if there is another way to achieve this without editing the resource dictionary that would also help.

Thanks

Mark
Dani
Telerik team
 answered on 08 Mar 2011
5 answers
105 views
Hi,

in release notes I saw, that now it's possible to navigate with HOME/END and PGUP/PGDOWN. That's great and it fundamentally works.
But I figured out some problems (in general keyboard navigation):
1. We only need row selection and no cell selection. We worked around this by setting cell selector style to something "invisible".
2. If a row gets selected via ViewModel it isn't brought into view. I worked around this by using ScrollIntoView() when ViewModels SelectedItem property changed. Sometimes I get performance issues, but couldn't reproduce them: the scrollbar moves very very slowly but the grid doesn't get updated. After several seconds it then updates the grid.
3. If I navigate via arrow down/up key very fast, the selected row is not enforced to contain the selected cell. That means there is a selected cell further up/down to the navigation direction than the selected row.
4. Sometimes it is not possible to navigate to the last row via key down (with RowDetails enabled) - the same with the first row and key up
5. If I reach the last row in the grid it looses keyboard focus (it doesn't matter which key invokes the navigation - I tried key up/down, home/end & page up/down.
6. the grid generally behaves very sluggish with keyboard navigation and enabled RowDetails

RadControls tested: 2010.3.1415.40

Greetings,
Daniel
Nedyalko Nikolov
Telerik team
 answered on 08 Mar 2011
1 answer
134 views
Hello All,

In WPF, how can I put a RadTreeView directly inside a RadPanelBarItem without highlighting effect?

this is what I've tried:
<telerik:RadPanelBar Orientation="Vertical" Background="Gray" ExpandMode="Multiple" >
    <telerik:RadPanelBarItem IsExpanded="True" Header="Locations" Style="{DynamicResource sidePanelRadPanelBarItemStyle}">
    <
telerik:RadTreeView>
            <telerik:RadTreeViewItem Header="Person A" >
                <telerik:RadTreeViewItem Header="Child 01"/>
                <telerik:RadTreeViewItem Header="Child 02"/>
                <telerik:RadTreeViewItem Header="Child 03"/>
                <telerik:RadTreeViewItem Header="Child 04"/>
            </telerik:RadTreeViewItem>
            <telerik:RadTreeViewItem Header="Person Two" >
                <telerik:RadTreeViewItem Header="Child 01"/>
                <telerik:RadTreeViewItem Header="Child 02"/>
                <telerik:RadTreeViewItem Header="Child 03"/>
                <telerik:RadTreeViewItem Header="Child 04"/>
                <telerik:RadTreeViewItem Header="Child 05"/>
                <telerik:RadTreeViewItem Header="Child 06"/>
            </telerik:RadTreeViewItem>
        </telerik:RadTreeView>
    </telerik:RadPanelBarItem>
</telerik:RadPanelBar>


and this is the style i use:
<Style x:Key="sidePanelRadPanelBarItemStyle" TargetType="{x:Type telerik:RadPanelBarItem}">
    <Setter Property="Background">
        <Setter.Value>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="Gainsboro" Offset="-0.5"/>
                <GradientStop Color="Black" Offset="0.2"/>
                <GradientStop Color="Black" Offset="1"/>
            </LinearGradientBrush>
        </Setter.Value>
    </Setter>
    <Setter Property="BorderBrush" Value="#FF848484"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Foreground" Value="White"/>
    <Setter Property="Padding" Value="5"/>
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                <Grid x:Name="RootElement">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid x:Name="HeaderRow" Background="Transparent">
                        <ContentControl x:Name="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="False" RadiusY="2" RadiusX="2" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                    </Grid>
                    <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed" VerticalAlignment="Top" >
                        <ItemsPresenter/>
                    </Grid>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsFocused" Value="True">
                        <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                    </Trigger>
                    <Trigger Property="IsExpanded" Value="True">
                        <Setter Property="Visibility" TargetName="ItemsContainer" Value="Visible"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="ItemsPanel">
        <Setter.Value>
            <ItemsPanelTemplate>
                <telerik:PanelBarPanel IsItemsHost="True"/>
            </ItemsPanelTemplate>
        </Setter.Value>
    </Setter>
    <Style.Triggers>
        <Trigger Property="Level" Value="1">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:RadPanelBarItem}">
                        <Grid x:Name="RootElement" SnapsToDevicePixels="True">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid x:Name="HeaderRow">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="5">
                                    <Border BorderBrush="White" BorderThickness="0.2" Background="{TemplateBinding Background}"/>
                                </Border>
                                <ContentControl x:Name="Header" Grid.ColumnSpan="4" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Rectangle x:Name="FocusVisual" Grid.ColumnSpan="5" Grid.Column="0" IsHitTestVisible="False" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" Visibility="Collapsed"/>
                                <Rectangle x:Name="rect1" Grid.Column="3" HorizontalAlignment="Right" Margin="0,0,7.75,4.5" Stroke="{x:Null}" StrokeThickness="2" Width="13.5" Fill="#FF7C7C7C" Height="3.25" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5"/>
                                <Rectangle x:Name="rect2" Grid.Column="3" HorizontalAlignment="Right" Margin="0,5.277,7.75,0" Stroke="{x:Null}" StrokeThickness="2" Width="13.5" Fill="#FF7C7C7C" Height="3.25" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5"/>
                                <Rectangle x:Name="rect3" Grid.Column="3" HorizontalAlignment="Right" Margin="0,10.527,7.75,9.5" Stroke="{x:Null}" StrokeThickness="2" Width="13.5" Fill="#FF7C7C7C" Height="Auto" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5"/>
                            </Grid>
                            <Grid x:Name="ItemsContainer" Grid.Row="1" Visibility="Collapsed" Background="Gray" >
                            <telerik:LayoutTransformControl x:Name="transformationRoot" IsTabStop="False">
                                    <ItemsPresenter/>
                                </telerik:LayoutTransformControl>
                            </Grid>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Fill" TargetName="rect1" Value="White"/>
                                <Setter Property="Fill" TargetName="rect2" Value="White"/>
                                <Setter Property="Fill" TargetName="rect3" Value="White"/>
                            </Trigger>
                            <Trigger Property="IsFocused" Value="True">
                                <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsExpanded" Value="True">
                                </Trigger.ExitActions>-->
                                <Setter Property="Fill" TargetName="rect1" Value="White"/>
                                <Setter Property="Fill" TargetName="rect2" Value="White"/>
                                <Setter Property="Fill" TargetName="rect3" Value="White"/>
                                <Setter Property="Visibility" TargetName="ItemsContainer" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Foreground" TargetName="Header" Value="Gray"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Fill" TargetName="rect1" Value="SteelBlue"/>
                                <Setter Property="Fill" TargetName="rect2" Value="SteelBlue"/>
                                <Setter Property="Fill" TargetName="rect3" Value="SteelBlue"/>
                                <Setter Property="Foreground" TargetName="Header" Value="SteelBlue"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Trigger>
    </Style.Triggers>
</Style>

In this style I basically retemplate the header visual. now with this style applied when i tried to hover the radtreeview, it is highlighted, how can i remove the highlight?
I've tried to add RadPanelBarItem inside the RadPanelBarItem and yeah the highlight there is removed, but how can I do that if the RadPanelBarItem's child is RadTreeView?


Thanks,
Dhany
dhany
Top achievements
Rank 1
 answered on 08 Mar 2011
1 answer
189 views
What event handles extending the appointment duration by dragging the thumb? I need to use the new values to update the database.

I already have code from handling the update from a drag and drop action. So subscribing to the appointment.PropertyChanged is not what I am looking for. I need something more specific for the drag of the start and end of the appointment.

Thanks,
Rod
Valeri Hristov
Telerik team
 answered on 07 Mar 2011
1 answer
131 views
Hi,

we have a weird occurence: when are invisible columns in the GridViewColumnCollection of a RadGridView and user drag and reorder columns - then the dragged column and the target column are overlapped (both header and data: as visible on the attached picture). With all visible columns or when invisible columns are grouped at the end of the gridview : this error situation does not happen.

What we doing wrong?

We use the Q3 2010 release of the WPF controls.

Balazs
Ivan Ivanov
Telerik team
 answered on 07 Mar 2011
2 answers
144 views
Hi

Is it possible to apply transition effects when the selected item in an OutlookBar changes? ie fade out the current content in the main view area, and fade in the new one?

Are there any examples of this?

Thanks
Tom Davies
Tom
Top achievements
Rank 1
 answered on 07 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?