Telerik Forums
UI for WPF Forum
1 answer
95 views
RadGridView In RadWizard's Content Can't Use ClipBoard by Ctrl + V
shane
Top achievements
Rank 1
 answered on 13 May 2016
3 answers
544 views
Hi,

I'm getting in a bit of a mess with the RadSplitButton so I'm hoping someone can get me back on track.

In summary, I'm trying to mimic the behavior of Outlook.
My sample application has a main window with a toolbar with a split button on it.
It also has an outlook bar and then a main region for content to be displayed according to the selected item in the outlook bar.
When you click the split button I'd like a new window to open.
The new window is not modal and you can have as many new windows as you like (that's how outlook works).

It kind of works at the moment but I have 2 issues I'm trying to resolve...

First, when you click one of the menu items in the drop down content the new window opens but the drop down content does not disappear? I'm hoping this is just a property somewhere I need to set, but I can't see anything obvious.

Second, in outlook...
If Mail is selected in the outlook bar the split button has a default action of new message.
If Calendar is selected in the outlook bar the split button has a default action of new appointment.
etc.etc.

How do I go about changing the default action of the split button?

Apologies if I'm looking in the wrong place, but the documentation on the split button seems lacking in detail.
It gives examples of how to structure a split button but none of the examples seem to give any details about wiring the button up to commands.

I honestly don't know if I've got this all wrong.
Should I be using separate commands for each item in the split button?
or should the split button be wired up to a single command with a command parameter and each item has a different value for the parameter?

Here's my XAML which hopefully will be enough for someone to spot where I'm going wrong...

<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="RadSplitButtons.View.MainView"
        Title="MainView" Height="600" Width="800">
 
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="booleanVisibilityConverter" />
    </Window.Resources>
 
    <DockPanel>
        <telerik:RadToolBarTray DockPanel.Dock="Top">
            <telerik:RadToolBar>
                <telerik:RadSplitButton Command="{Binding NewClientCommand}">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="/Icons/Client.png" />
                        <TextBlock VerticalAlignment="Center">New</TextBlock>
                    </StackPanel>
                    <telerik:RadSplitButton.DropDownContent>
                        <StackPanel>
                            <MenuItem Header="Client" Command="{Binding NewClientCommand}">
                                <MenuItem.Icon>
                                    <Image Source="/Icons/Client.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem Header="Diary Entry" Command="{Binding NewDiaryEntryCommand}">
                                <MenuItem.Icon>
                                    <Image Source="/Icons/Diary.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                            <MenuItem Header="Task" Command="{Binding NewTaskCommand}">
                                <MenuItem.Icon>
                                    <Image Source="/Icons/Task.png" />
                                </MenuItem.Icon>
                            </MenuItem>
                        </StackPanel>
                    </telerik:RadSplitButton.DropDownContent>
                </telerik:RadSplitButton>
            </telerik:RadToolBar>
        </telerik:RadToolBarTray>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <telerik:RadOutlookBar Name="outlookBar" Grid.Column="0" Width="200">
                <telerik:RadOutlookBarItem Name="obiClients" Header="Clients" Icon="/Icons/Client.png" FontWeight="Bold" />
                <telerik:RadOutlookBarItem Name="obiDiary" Header="Diary" Icon="/Icons/Diary.png" FontWeight="Bold" />
                <telerik:RadOutlookBarItem Name="obiTasks" Header="Tasks" Icon="/Icons/Task.png" FontWeight="Bold" />
            </telerik:RadOutlookBar>
            <StackPanel Grid.Column="1" >
                <TextBlock Text="{Binding ElementName=outlookBar, Path=SelectedItem.Header}" />
                <TextBlock Visibility="{Binding ElementName=obiClients, Path=IsSelected, Converter={StaticResource booleanVisibilityConverter}}">A list of clients would go here...</TextBlock>
                <TextBlock Visibility="{Binding ElementName=obiDiary, Path=IsSelected, Converter={StaticResource booleanVisibilityConverter}}">A view of the diary would go here...</TextBlock>
                <TextBlock Visibility="{Binding ElementName=obiTasks, Path=IsSelected, Converter={StaticResource booleanVisibilityConverter}}">A list of tasks would go here...</TextBlock>
            </StackPanel>
 
        </Grid>
    </DockPanel>
 
</Window>


Thanks in advance for any help or advice.

CA.
David Totzke
Top achievements
Rank 2
 answered on 12 May 2016
1 answer
121 views

hi my friend

How to add insert to database functionality in RadDataForm

Stefan
Telerik team
 answered on 12 May 2016
2 answers
189 views

Trying out the property grid and haven't been able to figure out how I can override the default template for common .NET types such as float to use the RadNumericUpDown rather than a TextBox. I looked at setting a custom DataTemplateSelector as described here: http://docs.telerik.com/devtools/wpf/controls/radpropertygrid/features/datatemplateselector.html but this can only work if I know the property name. So my question is the following: how can I change the default float editor template in the property grid? I want to do this for integers, colors, and many more common types. I don't want to have to add custom attributes to all the properties either.

 

Thanks!

Guy

Stefan
Telerik team
 answered on 12 May 2016
7 answers
433 views
See subject line.

I want to tear off a pane to be floating and then ble able that the main window (the starting window that is hosting the RadDocking Control) can be in front of the pane (toolwindow) that is now floating. Is this possible?

I've seen that you can override the default implementation of IGeneratedItemsFactory which is consulted when the toolwindow is created. Would that help me?

Regards,
Frank
Mart71
Top achievements
Rank 1
 answered on 12 May 2016
5 answers
199 views

Hi,

the ItemsLoaded event is called using an IEnumerable of the items that were loaded. If the underlying collection of the VirtualQueryableCollectionView is an IQueryable (e.g. a DB-Queryable) and I want to iterate over the loaded elements, another DB-Query is created. The expected behavior should be, that it is only enumerated once and the list is sent in the ItemsLoaded event.

Best regards,

Philipp

Stefan
Telerik team
 answered on 12 May 2016
1 answer
358 views

Hello,

I want to display multiple scatter line series dynamically from View Model. Right now, I am displaying succesfully using the below code but my requirement is not to use ScatterLineSeries multiple times and give it from View Model. I tried series provider but it is not giving anything. Is there any example for this ?

I don't know how many scatterlineseries I need and it is dynamic. How can I do this ?

 

<telerik:RadCartesianChart x:Name="Chart">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis Maximum="{Binding Max}" Minimum="0" Title="Generation" TickThickness="0">
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.HorizontalAxis>

            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis Maximum="{Binding QMax}"  Minimum="{Binding QMin}" Title="Q (Max/Min)" TickThickness="0">
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.Annotations>
                <telerik:CartesianGridLineAnnotation Axis="{Binding VerticalAxis, ElementName=DCurverChart}" Value="0" ></telerik:CartesianGridLineAnnotation>
            </telerik:RadCartesianChart.Annotations>

            <telerik:RadCartesianChart.Series>
                <telerik:ScatterLineSeries ItemsSource="{Binding MaxDummyDataPoints}" XValueBinding="XValue" YValueBinding="YValue" Stroke="SaddleBrown">
                    <telerik:ScatterLineSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Fill="Red" Width="5" Height="5" />
                        </DataTemplate>
                    </telerik:ScatterLineSeries.PointTemplate>
                </telerik:ScatterLineSeries>
                <telerik:ScatterLineSeries ItemsSource="{Binding MinDummyDataPoints}" XValueBinding="XValue" YValueBinding="YValue" Stroke="SaddleBrown" >
                    <telerik:ScatterLineSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Fill="Red" Width="5" Height="5" />
                        </DataTemplate>
                    </telerik:ScatterLineSeries.PointTemplate>
                </telerik:ScatterLineSeries>
                <telerik:ScatterLineSeries ItemsSource="{Binding DataPoints}" XValueBinding="XValue" YValueBinding="YValue">
                    <telerik:ScatterLineSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Fill="Red" Width="5" Height="5" />
                        </DataTemplate>
                    </telerik:ScatterLineSeries.PointTemplate>
                </telerik:ScatterLineSeries>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>

Martin Ivanov
Telerik team
 answered on 12 May 2016
1 answer
91 views

Hi, Everytime a new appointment is added, I would like to send it off to my outlook. I have the code to send it to outlook, but I'm looking to trigger it upon new appointment has been completed.

May I ask how do I set an event to fire after 'OK' is clicked. Or what is the best method to save the new appointments. 

 

 

Yana
Telerik team
 answered on 12 May 2016
1 answer
107 views

Hello,

Is it possible to dynamically change the FontSize of Office2013 Theme (as it's written in the documentation) ? I'm able to dynamically change the fontSize with VisualStudio2013 Theme, but not with Office2013...

Thank you

Leon

Martin
Telerik team
 answered on 11 May 2016
1 answer
429 views
We are currently migrating a legacy system to .NET and part of my task is to design a UI framework that is able to integrate into our existing structure with as little friction as possible. For this purpose, I have written small wrapper controls that offer the interface we need, internally use Telerik controls, and translate as necessary between both.

One of the requirements is that, after selecting a dropdown item, the ComboBox itself does not decide which data to display in its TextBox. Rather, a different object will be informed about which index was selected and will set the desired text for the RadComboBox (and may also do various other things, dependent on the ComboBox and the selected index). As things currently are, the RadComboBox will automatically fill its TextBox with the result of a .ToString() of the selected dropdown item/business object. Almost immediately afterwards, our "deciding" object will overwrite the text with the desired value. This produces an unwanted flickering.

I did not find any way of telling an editable RadComboBox to stop setting its own text. I have tried setting the TextSearch.TextPath Property to an invalid value, which kind of looks better (it sets an empty string as the text, which looks more like a delay than flickering), but it triggers an ArgumentException (that is automatically swallowed), which is ugly, and comes with a noticeable delay. I have also tried handling various events (such as SelectionChanged, or the routed TextBoxBase.TextChanged Event) and setting the Handled Property of the EventArgs when we want to stop this event - but that was consequently ignored by the RadComboBox.

A similar problem was the automatic overwriting of the TextBox text when navigating the dropdown with the keyboard; Setting the CanKeyboardNavigationSelectItems property to false was the solution to that. Is a similar solution available to the problem described above, or is the setting-text-to-TextBox-on-selection baked in so much that it would be better for us to look for alternative ideas?
Nasko
Telerik team
 answered on 11 May 2016
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
Security
VirtualKeyboard
HighlightTextBlock
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?