Telerik Forums
UI for WPF Forum
4 answers
162 views
Hi,

I need to populate the dropdown menu available at the bottom of the Radoutlooktoolbar. The idea is to provide menus and submenus when the user clicks the dropdown menu (the small inverted triangle) currently am totally unable to do that. I used ItemDropDownContentTemplate to accomplish this. I used the following code snippet.

 

<

 

 

telerik:RadOutlookBar x:Name="RadOutlookBar1"

 

 

 

MaxWidth="760" ItemsSource="{Binding}"

 

 

 

ItemTemplate="{StaticResource BarTemplate}"

 

 

 

ContentTemplate="{StaticResource redefineoutlook}"

 

 

 

TitleTemplate="{StaticResource BarTemplate}"

 

 

 

Margin="0,0,330,0" ItemDropDownContentTemplate="{StaticResource BarTemplate}">

I am successfully able to populate the Itemtemplate,Content template and the Title templates however the ItemDropdownContentTemplate is the missing link.
Bartemplate is something like below:

 

 

 

 

<DataTemplate x:Key="BarTemplate" >

 

 

 

 

<TextBlock Text="{Binding Path=A}" FontWeight="Bold" />

 

 

 

 

</DataTemplate>

Note:This template works fine in Titletemplate, ItemTemplate. Have no clue why it is not working in ItemDropdownContentTemplate. Kindly advise me where am wrong. Also let me know if there is anyother way to accomplish my requirements. This is rather urgent I need to do this ASAP.

-Kaarthik(skmit87@gmail.com)

 

Petar Mladenov
Telerik team
 answered on 26 Oct 2011
8 answers
401 views

Using Telerik WPF for .NET 4

OS: Windows Server 2008

Assuming a RadGridView named "grid" is defined in XAML the following code works in

WPF Version 2011.2.712.40 but not in later versions such as 2011.2.920.40 or 2011.2.1010.40.

Calling grid.Rebind() however works for all versions.

Expected result:

Calling mi1_Click should update the value in the first cell of the grid.

public partial class MainWindow : Window
    {
        private ObservableCollection<MyDynamicObject> myObjects;
        private int Counter;
          
        public MainWindow()
        {
            InitializeComponent();
            myObjects = new ObservableCollection<MyDynamicObject>();
            for (int i = 0; i < 5; i++)
            {
                dynamic myObject = new MyDynamicObject();
                myObjects.Add(myObject);
            }
            GridViewDataColumn col = new GridViewDataColumn();
            col.Header = "Prop1";
            col.DataMemberBinding = new Binding("Prop1");
            col.DataType = typeof(string);
            grid.Columns.Add(col);
            grid.ItemsSource = myObjects;
        }
  
        private void mi1_Click(object sender, RoutedEventArgs e)
        {
            MyDynamicObject myObj = myObjects[0];
            Counter++;
            myObj.PropertyDict["Prop1"] = Counter.ToString();
            myObj.NotifyPropertyChanged("Prop1");
        }
    }
  
    public class MyDynamicObject : DynamicObject, INotifyPropertyChanged
    {
        public readonly Dictionary<string, object> PropertyDict;
        public event PropertyChangedEventHandler PropertyChanged;
  
        public void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
          
        public MyDynamicObject()
        {
            PropertyDict = new Dictionary<string, object>();   
        }
         
        public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
            string propertyName = binder.Name;
            object obj1;
            result = null;
            if (PropertyDict.TryGetValue(propertyName, out obj1))
                result = obj1;
            return true;
        }
  
        public override bool TrySetMember(SetMemberBinder binder, object value)
        {
            string propertyName = binder.Name;
            PropertyDict[propertyName] = value;
            return true;
        }
    }
Nedyalko Nikolov
Telerik team
 answered on 26 Oct 2011
1 answer
53 views
Hi,
How can I populate a StackedArea1003D chart at code behind?
I have a collection of Date(x axis), Price(y axis) and Delta(z axis) to show on chart.

Evgenia
Telerik team
 answered on 26 Oct 2011
7 answers
322 views
Hi,

shouldn't the RadContextMenu ensure on opening that the focus is within the attached element (or a child of it) in order to ensure that routed commands are working properly ?
Lets say I've two controls A and B.
Control B has a RadContextMenu set and contains a listbox.
The context menu contains one item "Copy" with the corresponding ApplicationCommands.Copy command set.
Control B has class command handlers for the Execute and CanExecute events of the ApplicationCommands.Copy command set.

Now if  control A receives the focus, you can still open the context menu for control B by simply right-clicking on it.
But the "Copy" menu item is now always disabled, since without the focus, the CanExecute and Execute event handlers of Control B are never called, so nobody listens on CanExecute in this case => the command is disabled.

If you left click on B's listbox and then open the context menu via right click, everything works properly, since now the listbox or it's item has the focus and CanExecute event walks up to control b.

Did I overlook something or do I really need to handle the RadContextMenu.ContextMenuOpening event manually and check whether to set the focus or not ?

Thanks in advance

Thorsten Klingert

Rosi
Telerik team
 answered on 26 Oct 2011
9 answers
440 views
I tried restyling the RadDocking ToolWindows. So I followed the instructions, created a dummy control with a RadDocking in it. copied a ToolWindow Style to a ResourceDictionary.

However now I end up with an error

Error 1 The type reference cannot find a public type named 'RadDockingTheme'.

The error refers to
 <Style x:Key="{telerik:ThemeResourceKey ThemeType={x:Type local:RadDockingTheme}, ElementType={x:Type telerik:ToolWindow}}" TargetType="{x:Type telerik:ToolWindow}">

I Have an empty class like this :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Windows.Controls;

namespace RadControlsWpfApp1
{
    public class RadDockingTheme:Theme
    {
    }
}

and added xmlns:local="clr-namespace:RadControlsWpfApp1;assembly=RadControlsWpfApp1" before the style definition.

Can somebody tell me waht is wrong or post the source code of a working example of a restyled radpane toolbox?

Thanks in Advance!

Pieter

Dani
Telerik team
 answered on 26 Oct 2011
1 answer
107 views
Is it possible to bind and a funtion to "Add New Criteria" and "Delete" buttons onClick event?

Or an alternative event that fires everytime a new Filter Criteria or Nested Operator is added?

http://www.telerik.com/help/silverlight/raddatafilter-visual-structure.html

Rossen Hristov
Telerik team
 answered on 26 Oct 2011
1 answer
201 views
 

Hello Telerik Team,

I have a requirement where the rad combobox has a list of names. After selecting a value from the dropdown panel, the selected name should be displayed as a hyperlink.
I have managed to get the hyperlink by using a DataTemplate in the SelectionBoxTemplate of the radcombobox as shown below.

 

<UserControl.Resources>
<DataTemplate x:Key="SelectionBoxTemplateKey">
            <TextBlock>
                <Hyperlink Tag="{Binding Path=FocalUserId}" Name="hyplnkFocalFullName" 
                                Click="hyplnkFocalFullName_Click">
                    <TextBlock Text="{Binding FocalFullName}" ></TextBlock>
                </Hyperlink>
            </TextBlock>
        </DataTemplate>
</UserControl.Resources  
  
  
<Telerik:RadComboBox Name="radCmbFocal" IsEditable="False" Grid.Row="3" Grid.Column="5" Width="130"
      SelectedValue="{Binding Path=FocalId,Mode=TwoWay}"    SelectedValuePath="FocalId"
   DisplayMemberPath="FocalFullName" SelectionBoxTemplate="{StaticResource SelectionBoxTemplateKey}" 
  
HorizontalAlignment="Left" Margin="7 0 0 0" VerticalAlignment="Center"
    
SourceUpdated="radCmbFocal_SourceUpdated">                
</Telerik:RadComboBox>

But the click event of the hyperlink doesn't get's fired, nor does the cursor pointer changes to hand cursor on hovering over the selected value as it does for a normal hyperlink.

Is there a solution to achieve this requirement.

Thanks.

Regards,
Mausami.

Dani
Telerik team
 answered on 26 Oct 2011
1 answer
86 views
is there any documentation for this new control

cheers

Jason
Rossen Hristov
Telerik team
 answered on 26 Oct 2011
1 answer
74 views
When I put 1 in Minimum, en type -5 the value is 1.

If I put 0 (zero) in Minimum and type -5, the value stays at -5...

Bug ?
Michel
Top achievements
Rank 1
 answered on 25 Oct 2011
0 answers
79 views
I would like to define how my columns are presented based on the value type (e.g. integers are red, double blue, Image is shown with an icon, Percentage with a progress bar, etc). I just read about DataTemplateSelector, is this the way intended for the RadGridView? If so how do I set the datatemplateselector on the gridview? If not, what is the correct approach?

thank you for your time!
marc
Top achievements
Rank 1
 asked on 25 Oct 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
Slider
Expander
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?