Telerik Forums
UI for WPF Forum
4 answers
376 views
Hi ya, I'm looking for some WPF sample where I can connect two Sql tables using a couple of RadGridView controls.

Can you please be so kind to provide some link or sample related to?

Thanks in advance and regards,
Enric
Top achievements
Rank 1
 answered on 27 Jan 2014
6 answers
230 views
I'm replacing some calls to MessageBox.Show() with calls to RadWindow.Alert so that the message dialogs match the theme of my application.  However, I noticed that the Alert dialog doesn't play any sort of system sound like MessageBox.Show.  Digging through the docs and the forum, I don't see any mention of this.  I'd definitely think the pre-defined dialogs should have some built-in system sound support., right?

Input appreciated.

Jeff
Rosen Vladimirov
Telerik team
 answered on 27 Jan 2014
1 answer
128 views
Hello,

I am using Radgridview, and there is a situation.
The gridview is binded to Observablecollection of Entity framework class.
I need to make some of the columns (2-4) readonly if the grid is in edit mode.
If adding new row, the columns should be editable.
I am using telerik:RadGridViewCommands.BeginInsert to add new row.

Note: MVVM pattern is followed.

Regards,
Reyas Mohammed
Yoan
Telerik team
 answered on 27 Jan 2014
1 answer
226 views
Hi
 When I try to open each wpf window in each docking panes with mvvm pattern Between connections of  windows  break and  i couldn't see sample that  on internet .Do you have an idea or a sample  to be helped me ?
Vladi
Telerik team
 answered on 27 Jan 2014
5 answers
158 views
In windows forms this function is available to change the headers of each grouping.
How do I accomplish the same functionality in WPF???

Thanks!
Vanya Pavlova
Telerik team
 answered on 27 Jan 2014
2 answers
501 views
Hello,

I'm using RadMenu in a "C#-WPF-MVVM-Microsoft Prism" application.

I have made a very simple example that reproduces the problem. In this example, I have a "File" menu with two items: "Open" and "Close".
At first, I want the "Open" item to be enabled, and the "Close" item to be disabled since there is nothing to close.

When the user clicks on "Open", the open operation is called via a Prism DelegateCommand. 
After this, I want the "Open" item to be disabled and the "Close" item to be enabled.

If you run the example, you will see that now both items are disabled.

MainWindow.xaml:
<Window x:Class="WpfApplication1.MainWindow"
        xmlns:Effects="clr-namespace:Telerik.Windows.Controls.ColorEditor.Effects;assembly=Telerik.Windows.Controls.Input"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
   <Window.Resources>
      <Style x:Key="MenuStyle" TargetType="telerik:RadMenuItem">
         <Setter Property="Header" Value="{Binding Name}"/>
         <Setter Property="ItemsSource" Value="{Binding ItemsCollection}"/>
         <Setter Property="Command" Value="{Binding MenuItemCommand}"/>
      </Style>
   </Window.Resources>
    <
Grid>
      <telerik:RadMenu x:Name="radMenu" ItemsSource="{Binding MenusCollection}" ItemContainerStyle="{StaticResource MenuStyle}" HorizontalAlignment="Left" VerticalAlignment="Top">
      </telerik:RadMenu>
   </Grid>
</Window>


MainWindow.xaml.ca:
namespace WpfApplication1
   {
   /// <summary>
   /// Interaction logic for MainWindow.xaml
   /// </summary>
   public partial class MainWindow : Window
      {
      ViewModel _viewModel = new ViewModel();
      public MainWindow()
         {
         InitializeComponent();
         base.DataContext = _viewModel;
         }
      }
   }


ViewModel.cs :
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Prism.Events;
using Microsoft.Practices.Prism.ViewModel;
using Microsoft.Practices.Prism.Commands;
 
namespace WpfApplication1
   {
   public delegate void MenuActionDelegate(object command);
   public delegate bool MenuIsEnabledDelegate(object command);
 
   public class ViewModel : NotificationObject
      {
      public ViewModel()
         {
         _menusCollection = new ObservableCollection<MyMenuItem>();
 
         MyMenuItemInfo menuInfo = new MyMenuItemInfo("File", 1, null, null);
         MyMenuItemInfo itemInfo = new MyMenuItemInfo("Open", 10, MenuAction, IsClosed);
         AddMenu(menuInfo, itemInfo);
 
         itemInfo = new MyMenuItemInfo("Close", 20, MenuAction, IsOpened);
         AddMenu(menuInfo, itemInfo);
         }
 
      private bool _isOpen;
      public bool IsOpened(object command)
         {
         return _isOpen;
         }
      public bool IsClosed(object command)
         {
         return !_isOpen;
         }
 
      public void MenuAction(object command)
         {
         if ((int)command == 10)
            {
            _isOpen = true;
            }
         else if ((int)command == 20)
            {
            _isOpen = false;
            }
         }
 
      private ObservableCollection<MyMenuItem> _menusCollection { get; set; }
      public ObservableCollection<MyMenuItem> MenusCollection
         {
         get { return this._menusCollection; }
         }
 
      public void AddMenu(MyMenuItemInfo menuInfo, MyMenuItemInfo itemInfo)
         {
         bool menuExists = false;
         MyMenuItem theMenu = null;
         foreach (MyMenuItem menu in _menusCollection)
            {
            if (menu.Name == menuInfo.Name)
               {
               theMenu = menu;
               menuExists = true;
               }
            }
 
         if (menuExists)
            {
            theMenu.AddMenuItem(itemInfo);
            }
         else
            {
            MyMenuItem newMenu = new MyMenuItem(menuInfo);
            newMenu.AddMenuItem(itemInfo);
            _menusCollection.Add(newMenu);
            }
         }
      }
 
 
   public class MyMenuItem
      {
      public MyMenuItem(MyMenuItemInfo itemInfo)
         {
         _itemInfo = itemInfo;
         _menuItemsCollection = new ObservableCollection<MyMenuItem>();
         MenuItemCommand = new DelegateCommand(MenuItemExecute, MenuItemCanExecute);
         }
 
      public void AddMenuItem(MyMenuItemInfo itemInfo)
         {
         MyMenuItem menuItem = new MyMenuItem(itemInfo);
         _menuItemsCollection.Add(menuItem);
         }
 
      private ObservableCollection<MyMenuItem> _menuItemsCollection { get; set; }
      public ObservableCollection<MyMenuItem> ItemsCollection
         {
         get { return _menuItemsCollection; }
         }
 
      public DelegateCommand MenuItemCommand { get; private set; }
 
      public void MenuItemExecute()
         {
         if (_itemInfo.MenuAction != null)
            {
            _itemInfo.MenuAction.Invoke(_itemInfo.Command);
            MenuItemCommand.RaiseCanExecuteChanged();
            }
         }
 
      private bool MenuItemCanExecute()
         {
         bool itemIsEnabled = true;
         if (_itemInfo.IsEnabled != null)
            {
            itemIsEnabled = _itemInfo.IsEnabled.Invoke(_itemInfo.Command);
            }
         return itemIsEnabled;
         }
 
      private MyMenuItemInfo _itemInfo;
      public string Name
         {
         get { return _itemInfo.Name; }
         set { _itemInfo.Name = value; }
         }
      }
 
 
 
   public class MyMenuItemInfo
      {
      public MyMenuItemInfo(string name, object command, MenuActionDelegate menuAction, MenuIsEnabledDelegate isEnabled)
         {
         Name = name;
         Command = command;
         MenuAction = menuAction;
         IsEnabled = isEnabled;
         }
 
      public string Name
         {
         get { return _name; }
         set { _name = value; }
         }
      public object Command
         {
         get { return _command; }
         set { _command = value; }
         }
      public MenuActionDelegate MenuAction
         {
         get { return _menuAction; }
         set { _menuAction = value; }
         }
      public MenuIsEnabledDelegate IsEnabled
         {
         get { return _isEnabled; }
         set { _isEnabled = value; }
         }
 
      private string _name;
      private object _command;
      private MenuActionDelegate _menuAction;
      private MenuIsEnabledDelegate _isEnabled;
      }
   }



Did I missed something?

Thanks
Mart71
Mart71
Top achievements
Rank 1
 answered on 25 Jan 2014
3 answers
154 views
I just noticed that my 3D chart maintains it's aspect ratio when I resize it's container.  I would like to be able to create a 3D column chart that is very wide relative to it's height (The 2D chart does this automatically).  I can't seem to do this because the chart won't "stretch" horizontally.  I have looked for an appropriately named property & searched the forums to no avail.  Am I missing something or is it not possible to change the aspect ratio of a 3D chart?
Thanks - Mitch
Yavor
Telerik team
 answered on 24 Jan 2014
2 answers
258 views
Hi There,
Is there a way to force select all text in a RadAutocompleteTextBox? I tried to set IsHighlighted = true but it didn't work.

Thanks,
Ke
Ke
Top achievements
Rank 1
 answered on 24 Jan 2014
1 answer
172 views
I want to show multiple values in Tooltippath of each stackbaritem. I also want to change whole look and feel of tooltipPath.
How can I do that. Please suggest.
Martin Ivanov
Telerik team
 answered on 24 Jan 2014
4 answers
60 views
Hi,

I'm using a WeekViewDefinition and I format the columns headers to display only the day of the week. The column representing the current date is sourrounded with a different color and I would like cancel this behaviour to have the style of my column the same as they other columns.

Thank's
Alain
Christie Admin
Top achievements
Rank 1
 answered on 24 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?