Telerik Forums
UI for WPF Forum
2 answers
264 views
HI,

I have a problem. I have AutoCompleteTextBox and TreeView, both work with the same SelectedItem.
The node must expand, when the user uses AutoCompleteTextBox, but it only works only if I expand node per MouseClick and Collapse it.

   <telerik:RadTreeView Grid.Row="1" Grid.ColumnSpan="3"
                                             IsEnabled="{Binding DisableOnEditMode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                             ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                             SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
                            <telerik:RadTreeViewItem IsExpanded="True"  Header="Nachschlagstabellenliste" Style="{StaticResource HeaderItem}" >
                                <telerik:RadTreeViewItem  Header="Dokumenttyp"
                                                     ItemTemplate="{StaticResource LookupItemTemplate}" Style="{StaticResource SubHeaderItem}"
                                                     ItemsSource="{Binding DocumentTypes, UpdateSourceTrigger=PropertyChanged}"/>
 
                                <telerik:RadTreeViewItem  Header="Dokumentart"
                                                     ItemTemplate="{StaticResource LookupItemTemplate}" Style="{StaticResource SubHeaderItem}"
                                                     ItemsSource="{Binding DocumentSysTypes, UpdateSourceTrigger=PropertyChanged}"/>
...

Thanks!
Dmitrijs
Top achievements
Rank 1
 answered on 18 Sep 2012
9 answers
1.5K+ views
I have just started using the Rad controls for WPF and have come across an issue I cannot resolve on my own. 

I open a RadWindow with the ShowDialog() function call.  The window appears, and is in Modal mode, however, if I set focus to another application, when I come back to my WPF application, the modal window is no longer on top.  There are no icons for the modal window in my task bar.  The only way I can get back modal window is to use the Alt-tab functionality.

In the XAML my Radwindow is defined:

                <telerik:RadWindow Name="radManagePartsWindow" Height="530" Width="1000"
                                   telerik:Theming.Theme="Office_Blue" Visibility="Collapsed"
                                   ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
                                   CanMove="True"
                                   Header="Part Manager"
                                   Opened="radManagePartsWindow_Opened"
                                   Closed="radManagePartsWindow_Closed" Activated="radManagePartsWindow_Activated"
                                   >
In my code I access it via:

        private void btnManagePart_Click(object sender, RoutedEventArgs e)
        {
            radManagePartsWindow.DataContext = DataContext;
            radManagePartsWindow.ShowDialog();
        }
How can I get the modal window to ALWAYS be on top?


Miroslav Nedyalkov
Telerik team
 answered on 18 Sep 2012
1 answer
151 views
I'm working on a project in which I am trying to make all the windows dockable. I have had success doing this but am having one small problem. I have the theme set at Expression_Dark for everything and when I undock one of the windows everything is fine, but when I dock it back anywhere on the screen the theme is broken on that specific pane and the color changes back to default. How can I fix this problem and reset the theme. I was going to invoke the panestatechange event and reset the theme from there but cant figure out the correct code to put within the event. My code for the xaml is posted below...any help would be appreciated. Thanks.
<ui:UserControlBase x:Class="CommandAlkon.COMMANDtrack.UserInterface.Controls.Dashboard"
    xmlns:ui="clr-namespace:CommandAlkon.COMMANDtrack.UserInterface.Bases"
    Background="Transparent"
    xmlns:parts="clr-namespace:CommandAlkon.COMMANDtrack.UserInterface.Controls.DashboardParts">
  
    <Grid>
        <telerik:RadDocking  BorderThickness="0" Padding="0" IsRestricted="True" RestrictedAreaMargin="100,100,100,100" telerik:StyleManager.Theme="Expression_Dark" >
  
            <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft">
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark">
                    <telerik:RadPane Header="Regions" CanUserClose="False" CanDockInDocumentHost="True">
                        <telerik:RadPane.Content>
                            <Border x:Name="BorderMainRegion" Grid.Row="1" CornerRadius="0,0,10,10" BorderThickness="0,1,0,0" Margin="2" >
                            <ListBox x:Name="RegionsListBox" />
                            </Border>
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark">
                    <telerik:RadPane Header="Plants" CanUserClose="False" >
                        <telerik:RadPane.Content>
                            <Border x:Name="BorderMainPlant" Grid.Row="1" CornerRadius="0,0,10,10"  BorderThickness="0,1,0,0" Margin="2" >
                            <ListBox x:Name="PlantsListBox" />
                            </Border>
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
  
            <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedTop" Height="300" telerik:StyleManager.Theme ="Expression_Dark">
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark">
                    <telerik:RadPane Name="PlantChartPane" Header="Plant" CanUserClose="False" >
                        <telerik:RadPane.Content>
                            <Border x:Name="BorderPlantChart" Grid.Row="1" CornerRadius="0,0,10,10" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0" Padding="2,0,2,3"/>
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark">
                    <telerik:RadPane Header="Schedule" CanUserClose="False">
                        <telerik:RadPane.Content>
                            <Border x:Name="BorderMainGrid" Grid.Row="1" CornerRadius="0,0,10,10" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
                            <ui:SchedulingControl x:Name="ScheduleLateness" IsScheduleLatenessControl="True"  />
                            </Border>
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark">
                    <telerik:RadPane Name="TrucksChartPane" Header="Trucks" CanUserClose="False" />
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
  
            <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom" Height="150" >
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark">
                    <telerik:RadPane Name="ExceptionsPane" Header="Exceptions" CanUserClose="False" >
                        <telerik:RadPane.Content>
                            <parts:Exceptions Grid.Column="0"/>
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark" >
                    <telerik:RadPane Header="Suggestions" CanUserClose="False" >
                        <telerik:RadPane.Content>
                            <parts:Suggestions Grid.Column="0" />
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
  
            <telerik:RadSplitContainer InitialPosition="DockedRight" Width="700">
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Expression_Dark" >
                    <telerik:RadPane Header="Loads" CanUserClose="False">
                        <telerik:RadPane.Content>
                            <parts:Loads Grid.Column="0" />
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
              
        </telerik:RadDocking>
    </Grid>
</ui:UserControlBase>
Georgi
Telerik team
 answered on 18 Sep 2012
0 answers
76 views
I have a DateTime collection in my viewmodel, I want to display a icon in the day header of SchedulieView(MonthViewDefinition) if it is present in DateTime collection.

Otherwise icon will not be displayed for that day if it is not present in DateTime collection.

What would be the best approach to achieve this?
Kshamesh
Top achievements
Rank 1
 asked on 18 Sep 2012
1 answer
283 views
I created a custom control that derives from RadDatePicker. I need to enlarge the control to make it easier to manipulate with a touchscreen and add a 'Today' button that jumps to today's date.

I've replaced the drop down icon with an image and added the button below the calendar drop-down with its Command bound to a DelegateCommand in the code-behind, as defined in CalendarStyle's Template setter. I had originally designed this as a user control, but both the command binding and the image's source is broken when converting to a custom control (and putting the templates in Themes\Generic.xaml).

<ResourceDictionary ...>
    <Style BasedOn="{StaticResource {x:Type telerik:RadDatePicker}}" TargetType="local:RadDatePickerXtnd">
        <Setter Property="CalendarStyle">
            ...
            <ControlTemplate TargetType="{x:Type telerik:RadCalendar}">
                <StackPanel>
                    <Grid>{Calendar control markup}</Grid>
                    <Button Name="PART_TodayButton" Command="{Binding TodayCommand}" Content="Today" />
                </StackPanel>
            </ControlTemplate>
            ...
        </Setter>
    </Style>
    <Setter Property="Template">
        ...
        <ContentControl x:Name="DropDownIcon" Background="White" Foreground="Black" IsTabStop="False">
            <ContentControl.Template>
                <ControlTemplate TargetType="{x:Type ContentControl}">
                    <Image Source="..\img\calendar.png" Width="24" Height="24" />
                </ControlTemplate>
            </ContentControl.Template>         
        </ContentControl>
        ...
    </Setter>
</ResourceDictionary>

The command binding no longer works because I don't know how to set a DataContext within Generic.xaml and I cannot find the right place in code behind to use Template.FindName() to traverse through RadDatePicker > RadCalendar > Button so I can set the binding programmatically. I get an InvalidOperationException - "This operation is valid only on elements that have this template applied." when I try to run "cal.Template.FindName("PART_TodayButton", this);" in OnApplyTemplate(). I'm guessing that CalendarStyle is applied afterwards.

public class RadDatePickerXtnd : RadDatePicker
{
    public Microsoft.Practices.Prism.Commands.DelegateCommand TodayCommand { get; private set; }

    ...
    public
override void OnApplyTemplate()
    {
        base.OnApplyTemplate();
  
        var cal = (RadCalendar)Template.FindName("PART_Calendar", this);
        var todayBtn = (Button)cal.Template.FindName("PART_TodayButton", this);
        // Bind Button.Command to DelegateCommand here
    }
    ...
}

In addition, the Image control isn't displaying the image in the drop-down button. I've tried moving the image to the base directory or the Themes directory and updating the path to no avail.
Michael
Top achievements
Rank 1
 answered on 18 Sep 2012
4 answers
415 views
Hello !

I'm using a custom hierarchy on a RadGridView as defined below :

<telerik:RadGridView x:Name="rgvAttributes" AutoGenerateColumns="False" CanUserDeleteRows="False"
                     IsReadOnlyBinding
="{Binding IsEditAttributesGrid,Mode=TwoWay}"
                    
ItemsSource="{Binding ListEntries}"
                    
SelectedItem="{Binding SelectedAttribute, Mode=TwoWay}" SelectionMode="Single">
    <i:Interaction.Behaviors>
        <helper:IsExpandableBehavior IsExpandableSourcePropertyName="IsExpandable" />
    </i:Interaction.Behaviors>
    <telerik:RadGridView.ChildTableDefinitions>
        <telerik:GridViewTableDefinition />
    </telerik:RadGridView.ChildTableDefinitions>
    <telerik:RadGridView.Columns>
        [...]
    </telerik:RadGridView.Columns>
    <telerik:RadGridView.HierarchyChildTemplate>
        <DataTemplate>
            <Control:ContentStepVisualizer />
        </DataTemplate>
    </telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>

In order to hide the Expand/Collapse Hierarchy button on several rows, I'm using the following method :
  1. As the name explains, the simple behavior "IsExpandableBehavior" is used to bind the "IsExpandable" property of each GridViewRow to the corresponding object property of the ObservableCollection<Attribute> ListEntries in my ViewModel,
  2. Setting the "IsExpandable" property of one of the Attribute object to False correctly hide the Expand/Collapse Hierarchy button of the corresponding row in the RadGridView.

When calling ExpandAllHierarchyItems() on the RadGridView, every hidden Expand/Collapse Hierarchy buttons appears back and every row expands.

It seems that the ExpandAllHierarchyItems() of RadGridView methods doesn't consider the state of the "IsExpandable" property before expanding a GridViewRow.

Is this the desired behavior or I have done something wrong provoking it ?

Many thanks for your help !

TheFlo

Aaron
Top achievements
Rank 1
 answered on 17 Sep 2012
0 answers
88 views
Hi,

What's the easiest/most efficient way of showing sums (or other aggregates) in a different currency than the current culture. For example, if my current culture is fr-FR but I have a column that's in USD, how would I go about showing the values and the totals in USD?
SADHANA
Top achievements
Rank 1
 asked on 17 Sep 2012
1 answer
208 views
The RadRibbonView control appears to require a minimum height to display, leaving dead whitespace below it, the following does not display the actual ribbon bar:

<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="150" />
<RowDefinition />
</Grid.RowDefinitions>
<telerik:RadRibbonView Grid.Row="0"  >
<telerik:RadRibbonTab Header="Home">
<telerik:RadRibbonGroup Header="Clipboard">
<telerik:RadRibbonSplitButton Text="Paste" 
                    telerik:ScreenTip.Title="Paste(Ctrl+V)"
                    telerik:ScreenTip.Description="Paste the contents the Clipboard.">
<telerik:RadRibbonSplitButton.DropDownContent>
<telerik:RadContextMenu BorderThickness="0">
<telerik:RadMenuItem Header="Paste" />
<telerik:RadMenuItem Header="Paste Form" />
</telerik:RadContextMenu>
</telerik:RadRibbonSplitButton.DropDownContent>
</telerik:RadRibbonSplitButton>
</telerik:RadRibbonGroup>
</telerik:RadRibbonTab>
</telerik:RadRibbonView>


<t:RadDocking Grid.Row="1" x:Name="_docking" PreviewClose="_docking_OnPreviewClose">
<t:RadDocking.DocumentHost>
<t:RadSplitContainer>
<t:RadPaneGroup x:Name="_paneGroup">
</t:RadPaneGroup>
</t:RadSplitContainer>
</t:RadDocking.DocumentHost>
</t:RadDocking>
</Grid>

but if I set the first row definition to 300 then it displays it with about 150px of dead white space below, why does the height of the control not work (incidentally specifying the RadRibbonView controls Height explicitly also does not change anything).  This is on Windows XP  Any ideas?
Tina Stancheva
Telerik team
 answered on 17 Sep 2012
1 answer
203 views
Hi,

I searched why some documents were very slow to refresh when we typed text (enough to was three to four words forward than the one that appears) and very long to load the document. Finally, the problem is when we have tables in the document. It begins to be slow with one table and more you have tables, slower is the refresh. Am I alone with this issue? My WPF RadControls version is the 2012.2.912.40.

Patrick
Petya
Telerik team
 answered on 17 Sep 2012
1 answer
148 views
Hi all,

i would design a header for floating window like that file attached.

how do i design it with WPF?
thank for any your help.
Boyan
Telerik team
 answered on 17 Sep 2012
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
+? 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?