Telerik Forums
UI for WPF Forum
1 answer
338 views
Hi,

How can i setup the Label Format in RadPieChart?

Thanks
Petar Kirov
Telerik team
 answered on 19 Apr 2013
3 answers
263 views
Hi,

I'm using RadWindow in my project and for each of them I set the following in my xaml:

    <telerik:RadWindow.IconTemplate>
        <DataTemplate>
            <Image Source="Resources/About_32x32.png" Height="24" Width="24" Stretch="Fill" Margin="0 0 3 0" />
        </DataTemplate>
    </telerik:RadWindow.IconTemplate>

When my RadWindow is visible, the ico attache to my RadWindow is clearly the one I have in my IconTemplate. When I minimize my RadWindow on my taskbar, the icon on the taskwindow is the default one (a small window).

Thank's
N Mackay
Top achievements
Rank 1
 answered on 19 Apr 2013
4 answers
470 views
Hi'
I would like to use custom shapes together with MVVM. I have followed the online documentation regarding MVVM and RadDiagram:
http://www.telerik.com/help/wpf/raddiagrams-howto-mvvm.html
But I do not know how to create custom shapes when using MVVM - could you please provide an example?
Thanks,
Michael
Tina Stancheva
Telerik team
 answered on 19 Apr 2013
1 answer
89 views
I have a RadGridView in a Word AddIn, and my users want to use the "Contains" or "IsEqualTo" features of the filtering.

This AddIn just contains the RadGridView and a pager, so the height of the Addin is only as high as those two added together.

This all works just fine as long as the grid is expanded vertically enough so that the "Contains" or "IsEqualTo" textboxes are over the Addin, but if the grid height is decreased so that "Contains" or "IsEqualTo" is now over some other part of Word, if I try to type into "Contains", I'm really typing into the Word document.

Any assistance on getting the Filter dropdown to retain it's focus?

Thanks!

-Dave
Yoan
Telerik team
 answered on 19 Apr 2013
2 answers
115 views
Hi

Are there support for custom attributes on individual elements in the RichTextBox, or some possibility to extend the RTB to support it?
What i would like to achieve is to programmatically add, say an ID (or other forms of metadata), to individual elements on the canvas such as an image, a table, footnote and so on, and then be able to track/read the attributes at a later point via exported xaml from the XamlFormatProvider.

Hope this makes sense.

Best regards,
Terje
Terje
Top achievements
Rank 1
 answered on 19 Apr 2013
1 answer
404 views
I have a RadGridView which has its ItemsSource property bound to the the DefaultView of a DataTable that is created and updated by a ViewModel.  The GridView has the AutoGenerateColumns property set to true.

When columns are added to this DataTable and the PropertyChanged event is fired, the new columns are not added to the GridView.

Also, when columns are removed from the DataTable and the PropertyChanged event is fired, the data from these columns is removed from the GridView, but not the columns themselves.

Does the AutoGenerateColumns property only generate columns when the control is initialized?  Does this behavior of dynamically removing and adding columns as the underlying DataTable is changed not exist?
Pavel Pavlov
Telerik team
 answered on 19 Apr 2013
1 answer
214 views
Not sure if this is an issue or I'm just using it wrong....
I am trying to capture when a User "Clicks" a Tile in my Tile List and then perform an Action.  The below works okay except that if one Tile is currently selected and you Click a new Tile the Event below will fire 3 times.  Twice with the new Tile as an AddedItem thereby firing my Method twice.  

How can I do this different so as to not have my method fire multiple times?  Is there a different event I should look at?  I was able to capture the Tile's MouseDoubleClick event but that isn't truly what I want to do.

This is a WPF 4.5 app using Telerik release(2013.1.403.45).

<telerik:RadTileList x:Name="AppLaunchPad"
          GroupTemplate="{StaticResource GroupTemplate}"
          ScrollViewer.HorizontalScrollBarVisibility="Visible"
          cal:Message.Attach="[Event SelectionChanged] = [Action OpenDoorway($eventArgs)]">

public void OpenDoorway(SelectionChangedEventArgs e)
{
    var s = e.Source as RadTileList;           
    var t = e.AddedItems.Count;
    if (t > 0)
    {
        windowManager.Alert("Testing", "This came from the Launcher: " + s.SelectedItem.ToString());
    }
}
Maya
Telerik team
 answered on 19 Apr 2013
1 answer
104 views
I get the following exception when I paste from your WPF Controls Examples and reduce the contents of RadPanes (See xaml below).
Any suggestions for a way forward?

Anders, Denmark

Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.PopupHostManagerBase.GetManager(DependencyObject obj) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\PopupWindowHost.cs:line 308
   at Telerik.Windows.Controls.InternalWindow.SinglePopupWindowHost.GetHostManager() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\SinglePopupWindowHost.cs:line 22
   at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Open(Boolean isModal) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\PopupWindowHost.cs:line 77
   at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 891
   at Telerik.Windows.Controls.Docking.ToolWindow.Open() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Parts\ToolWindow.cs:line 121
   at Telerik.Windows.Controls.RadDocking.OpenInToolWindow(RadSplitContainer container) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 797
   at Telerik.Windows.Controls.RadDocking.InitializeSplitContainer(RadSplitContainer container) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 1325
   at Telerik.Windows.Controls.RadDocking.OnApplyTemplate() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 180
   at System.Windows.FrameworkElement.ApplyTemplate()
   at Microsoft.Expression.Platform.WPF.WpfViewNodeManager.EnsureElementInDictionary(Object root, ViewNode knownAncestor)



<
telerik:RadDocking x:Name="radDocking1" 
                    Grid.Row="1" Margin="0 0 0 10"
                    BorderThickness="0"
                    Padding="0" Background="{StaticResource LightGrayBrush}">
 
    <!--DocumentHost-->
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup>
                <telerik:RadDocumentPane Title="Description">
                </telerik:RadDocumentPane>
                <telerik:RadPane Header="NotDragable" CanFloat="False">
                </telerik:RadPane>
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
 
    <telerik:RadSplitContainer  MaxWidth="600" telerik:DockingPanel.InitialSize="210,150"
    Name="LeftContainer" InitialPosition="DockedLeft">
        <telerik:RadPaneGroup x:Name="Group1">
            <!--Server Exproler-->
            <telerik:RadPane x:Name="Pane1" Header="Server Explorer">
            </telerik:RadPane>
 
            <!--Toolbox-->
            <telerik:RadPane x:Name="Pane2" Header="Toolbox">
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
 
    <telerik:RadSplitContainer MaxWidth="679" telerik:DockingPanel.InitialSize="210,150"
    x:Name="RightContainer" InitialPosition="DockedRight">
        <telerik:RadPaneGroup x:Name="Group2">
 
            <!-- Solution Explorer -->
            <telerik:RadPane x:Name="Pane3" Header="Solution Explorer">
            </telerik:RadPane>
 
            <!--Properties-->
            <telerik:RadPane x:Name="Pane4" Header="Properties">
             </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
 
    <telerik:RadSplitContainer InitialPosition="FloatingDockable"
    telerik:RadDocking.FloatingLocation="450, 250"
    telerik:RadDocking.FloatingSize="300, 220">
        <telerik:RadPaneGroup>
            <telerik:RadPane Header="Not Document Pane" CanDockInDocumentHost="False">
             </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
 
    <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="200,180"
    x:Name="BottomContainer" InitialPosition="DockedBottom">
        <telerik:RadPaneGroup x:Name="Group3">
 
            <!-- Output -->
            <telerik:RadPane x:Name="Pane5" Header="Output">
             </telerik:RadPane>
 
            <!--Error List-->
            <telerik:RadPane x:Name="Pane6" Header="Error List">
             </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>
Anders
Top achievements
Rank 1
 answered on 19 Apr 2013
1 answer
186 views
Hi,
I'm using Caliburn Micro as my MvvM framework and the Simple Injector IOC Container for developing an plugin based application. On the main application i have a RibbonView which loads its tabs on startup from .dll files.

So I have created a class library project where I define my xaml file with the RadRibbonTab Item.

<telerik:RadRibbonTab x:Class="TestTabLibrary.RibbonTabView"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                      xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
                      Header="Plugin Test">
    <telerik:RadRibbonGroup Header="TestGoup 1">
        <telerik:RadRibbonButton Text="Button 1" cal:Message.Attach="[Event Click] = [Action Group1Button1]"/>
        <telerik:RadRibbonButton Text="Button 2" cal:Message.Attach="[Event Click] = [Action Group1Button2]"/>
    </telerik:RadRibbonGroup>
 
    <telerik:RadRibbonGroup Header="TestGoup 2">
        <telerik:RadRibbonButton Text="Button 1" cal:Message.Attach="[Event Click] = [Action Group2Button1]"/>
        <telerik:RadRibbonButton Text="Button 2" cal:Message.Attach="[Event Click] = [Action Group2Button2]"/>
    </telerik:RadRibbonGroup>
</telerik:RadRibbonTab>
 
Also I want to define the ViewModel class in this library.

public class RibbonTabViewModel : IViewModel
    {
        public void Group1Button1()
        {
            Console.WriteLine("Group1Button1");
        }
 
        public void Group1Button2()
        {
            Console.WriteLine("Group1Button2");
        }
 
        public void Group2Button1()
        {
            Console.WriteLine("Group2Button1");
        }
 
        public void Group2Button2()
        {
            Console.WriteLine("Group2Button2");
        }
    }

I have defined two Interface ITabItem and IViewModel to decorate the RibbonTabView and RibbonTabViewModel which are then registered in the bootstrapper calss in the main application.

public class AppBootstrapper : Bootstrapper<MainViewModel>
   {
       public static readonly Container PublicContainer = new Container();
       readonly string _pluginDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Plugins");
        
       protected override void Configure()
       {
           PublicContainer.Register<IWindowManager, WindowManager>(Lifestyle.Singleton);
           PublicContainer.Register<IEventAggregator, EventAggregator>(Lifestyle.Singleton);
           PublicContainer.Register<MainViewModel>();
 
           var pluginAssemblies = from file in new DirectoryInfo(_pluginDirectory).GetFiles()
                                  where file.Extension == ".dll"
                                  select Assembly.LoadFile(file.FullName);
 
           var pluginTabItemsView = from dll in pluginAssemblies
                                    from type in dll.GetExportedTypes()
                                    where typeof(ITabItem).IsAssignableFrom(type)
                                    where !type.IsAbstract
                                    where !type.IsGenericTypeDefinition
                                    select type;
 
           PublicContainer.RegisterAll<ITabItem>(pluginTabItemsView);
 
           var pluginTabItemsViewModel = from dll in pluginAssemblies
                                    from type in dll.GetExportedTypes()
                                    where typeof(IViewModel).IsAssignableFrom(type)
                                    where !type.IsAbstract
                                    where !type.IsGenericTypeDefinition
                                    select type;
 
           PublicContainer.RegisterAll<IViewModel>(pluginTabItemsViewModel);
            
           PublicContainer.Verify();
       }
 
       protected override IEnumerable<object> GetAllInstances(Type service)
       {
           return PublicContainer.GetAllInstances(service);
       }
 
       protected override object GetInstance(Type service, string key)
       {
           return PublicContainer.GetInstance(service);
       }
   }

So far, so good. The classes are registered correctly and I can get an instance from them.

Next in the main xaml I simply have my RadRibbonView

<telerik:RadRibbonWindow x:Class="EtaStudio.View.MainView"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                         Title="MainView" Height="300" Width="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <telerik:RadRibbonView Grid.Row="0" ApplicationName="Eta Studio" ItemsSource="{Binding Items}"/>
    </Grid>
</telerik:RadRibbonWindow>

This View is bound to my MainVIewModel

public class MainViewModel : Conductor<ITabItem>.Collection.OneActive
   {
       public MainViewModel()
       {
           IEnumerable<ITabItem> instances = AppBootstrapper.PublicContainer.GetAllInstances<ITabItem>();
           Items.AddRange(instances);
       }
   }

Overall the tab is loaded correctly but when I click a button the wrong ViewModel is used, in this case the MainViewModel.
How can i achieve it to bind to the RibbonTabViewModel?

Best Regards
Markus
Klemens
Top achievements
Rank 1
 answered on 19 Apr 2013
1 answer
124 views
i cant seem to find a whole lot of info about how it works, are there beginner guides to the telerik wpf?
I downloaded 30days trial demo, but it just shows gui? The gui needs to be connected to my code behind, and this connection is what i cant find.
One thing i wanted to try was to make a button unEnabled after you press it, should be easy? I've tried a couple of things and none seems to work, please tell me what im doing wrong!
<Views:CustomViewBase.RibbonInformation>
    <entities:RibbonInformation Header="Operation">
        <entities:RibbonInformation.RibbonGroups>
            <telerik:RadRibbonGroup  x:Name="UIRibbonToolbar"  Header="Controls">
                 
                <telerik:RadRibbonButton Text="Back"
                                         Size="Large"
                                         LargeImage="/Images/Back.bmp"
                                         Click="RadRibbonButton_Click_Back"
                                         Name="RadRibbonButton_Back"
                                         IsEnabled="True"/>
                <telerik:RadRibbonButton Text="Play"
                                         Size="Large"
                                         LargeImage="/Images/Play.bmp"
                                         Click="RadRibbonButton_Click_Play"
                                         Name="RadRibbonButton_Play"
                                         IsEnabled="True"/>
                <telerik:RadRibbonButton Text="Stop"
                                         Size="Large"
                                         LargeImage="/Images/Stop.bmp"
                                         Click="RadRibbonButton_Click_Stop"
                                         Name="RadRibbonButton_Stop"
                                         IsEnabled="True"/>
                 
            </telerik:RadRibbonGroup>
        </entities:RibbonInformation.RibbonGroups>
    </entities:RibbonInformation>
</Views:CustomViewBase.RibbonInformation>
XAML
private void RadRibbonButton_Click_Stop(object sender, RoutedEventArgs e)
{
    this.IsEnabled = false;
    MessageBox.Show("Stop Button Pressed");
}
private void RadRibbonButton_Click_Play(object sender, RoutedEventArgs e)
{
    this.IsEnabled = false;
    MessageBox.Show("Play Button Pressed");
}
private void RadRibbonButton_Click_Back(object sender, RoutedEventArgs e)
{
    this.IsEnabled = false;
    MessageBox.Show("Back Button Pressed");
}
C#
Pavel R. Pavlov
Telerik team
 answered on 18 Apr 2013
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?