Telerik Forums
UI for WPF Forum
2 answers
161 views
The working temperature gauge example provided in the Silverlight/WPF demos uses the Windows 8 theme to style it. I am using a Implicit styles similar to the Executive Dashboard solution. In the Path information to create the "bulb" at the bottom of the temperature gauge there is a call to the Windows 8 Accent Brush:

Fill="{telerik:Windows8Resource ResourceKey=AccentBrush}"

I'm not sure what to change this to so that I can dynamically change to any theme. I tried changing it to:

Fill="{DynamicResource AccentBrush}"

But this did not work with Expression_Dark.

Can you help?
Marc
Top achievements
Rank 1
 answered on 20 Mar 2013
13 answers
198 views
In Coded UI builder the spy for RAD button is as shown in attachment("uia.radbutton.jpg") , but the  generated code is showing it as wpf control.
the generated code has this declaration

 

 

 

public WpfButton UIBtnButton

 

 

 

If i playback the recorded code, no actions are working. Can anyone suggest me on this.

Why the RadButton is getting identified as WpfButton??

*VS2012 premium with Q1 2013 is used.


Mask
Top achievements
Rank 1
 answered on 20 Mar 2013
1 answer
228 views
Hi,
I am using RadSlider, with range defined as follows:
telerik:RadSlider  Grid.Column="1"  VerticalAlignment="Center"
                                    Minimum="{Binding MinVal, Mode=OneWay}"
                                    Maximum="{Binding MaxVal, Mode=OneWay}"
                                    IsSelectionRangeEnabled="True"
                                    IsCoercionSuppressed="True"
                                    SelectionStart="{Binding LowValue, Mode=TwoWay}"
                                    SelectionEnd="{Binding HighValue, Mode=TwoWay}"
                                    StepAction="MoveRange"
                                    />
 
<telerik:RadNumericUpDown Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"  Margin="2" IsInteger="True" Value="{Binding LowValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
 
<telerik:RadNumericUpDown Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Center"  Margin="2" IsInteger="True" Value="{Binding HighValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
and everything works fine.
But- when put inside a Data template, so I can have it on an itemsconrol, I get the SelectionEnd not binded at all.
Using Snoop, shows that the SelectionStart is binding to the ParentTemplate and works fine, but the SelectionEnd is 'Local'. Using the Clear/Reset in Snoop's menu- it starts working.

The data template for reference:
<DataTemplate x:Key="RangeSlider">
            <Grid Height="30" Margin="2, 0, 2, 0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="30*"/>
                    <ColumnDefinition Width="30*"/>
                    <ColumnDefinition Width="20*"/>
                    <ColumnDefinition Width="20*"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Margin="2" VerticalAlignment="Center" Text="{Binding Name}" />
                <telerik:RadSlider  Grid.Column="1" Margin="2" VerticalAlignment="Center"
                                    IsSelectionRangeEnabled="True"
                                    Minimum="{Binding MinVal, Mode=OneWay}"
                                    Maximum="{Binding MaxVal, Mode=OneWay}"
                                    IsCoercionSuppressed="True"
                                    SelectionEnd="{Binding HighValue, Mode=TwoWay}"
                                    SelectionStart="{Binding LowValue, Mode=TwoWay}"
                                    StepAction="MoveRange"
                                    />
                 
                <telerik:RadNumericUpDown Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"  Margin="2" IsInteger="True"
                         Value="{Binding LowValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <telerik:RadNumericUpDown Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Center"  Margin="2" IsInteger="True"
                         Value="{Binding HighValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
            </Grid>
        </DataTemplate>
Appreciate any advice,

Thanks 
Yuval
Kiril Vandov
Telerik team
 answered on 20 Mar 2013
1 answer
144 views
Hello,

Is it possible to create a 'canvas' with specific dimensions?

For example, on one of your Diagram examples you have a 'New' button. I want the user to be able to press a 'New' button and then be presented with a pop-up asking for the 'canvas' size. When the user enters a valid canvas size and clicks 'Ok' a new 'canvas' would be created with the specified size, in a docakble panel, the user would then be unable to 'draw' outside of this canvas. 

Cheers,
Joel. 

Petar Mladenov
Telerik team
 answered on 20 Mar 2013
3 answers
172 views
Hi,

We have just upgraded to 2013.1.220.40 and now we have a problem where the ribbonview is not visible on some usercontrols/radwindows in our application. This is a problem in the designer and at run time. Please note that no other changes have been made, just upgrading telerik and now the ribbon is gone. An example of the XAML in a radwindow with the missing ribbon is listed below...

<telerik:RadWindow x:Class="Amtech.Wpf.Presentation.Modules.FastTest.Views.ObservationMaintenance.ObservationCategoryMaintenanceEditWindow"
        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:commonPresentation="clr-namespace:Amtech.Wpf.Common.ApplicationFramework.Presentation;assembly=Amtech.Wpf.Common.ApplicationFramework"        
        xmlns:commonControls="clr-namespace:Amtech.Wpf.Common.ApplicationFramework.Presentation.Controls;assembly=Amtech.Wpf.Common.ApplicationFramework"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:galaSoftCommand="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
        xmlns:commonTriggers="clr-namespace:Amtech.Wpf.Common.ApplicationFramework.Presentation.Triggers;assembly=Amtech.Wpf.Common.ApplicationFramework"        
        xmlns:commonConverters="clr-namespace:Amtech.Wpf.Common.ApplicationFramework.Presentation.Converters;assembly=Amtech.Wpf.Common.ApplicationFramework"        
        mc:Ignorable="d"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"         
        Header="{Binding Path=DisplayText}" 
        Height="227" 
        Width="566" 
        WindowStartupLocation="CenterOwner" 
        ResizeMode="NoResize" 
        Padding="5" 
        d:DesignHeight="575" 
        Name="windowObservatiobCategoryMaintenanceEdit">
    <telerik:RadWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Amtech.Wpf.Common.ApplicationFramework;component/Presentation/Assets/IconResources.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </telerik:RadWindow.Resources>
    <telerik:RadBusyIndicator IsBusy="{Binding IsBusy}" IsIndeterminate="True">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <telerik:RadRibbonView Name="ribbonView"  TitleBarVisibility="Collapsed" Grid.Row="0" Grid.ColumnSpan="2" ApplicationButtonVisibility="Collapsed">
                <telerik:RadRibbonTab Name="ribbonTabMain" Header="{Loc ObservationCategory}">
                    <telerik:RadRibbonGroup Name="ribbonGroupMain" Header="{Loc ObservationCategory}">
                        <telerik:RadRibbonButton Name="buttonSave" 
                                                CollapseToSmall="WhenGroupIsMedium"
                                                telerik:ScreenTip.Description="{Loc SaveObservationCategoryTooltip}"
                                                telerik:ScreenTip.Title="{Loc Save}"
                                                Size="Large"
                                                Command="{Binding Path=SaveCommand}"
                                                Text="{Loc Save}" 
                                                SmallImage="{StaticResource Save32}"/>
                        <StackPanel>
                            <telerik:RadRibbonButton Name="buttonCreateNew" 
                                                CollapseToSmall="WhenGroupIsMedium"                                          
                                                telerik:ScreenTip.Description="{Loc NewObservationCategoryTooltip}"
                                                telerik:ScreenTip.Title="{Loc NewObservationCategory}"
                                                Size="Medium" 
                                                Command="{Binding Path=CreateNewCommand}"
                                                Text="{Loc NewObservationCategory}"
                                                LargeImage="../../Resources/Icons32x32/cubes.png"/>
                            <telerik:RadRibbonButton Name="buttonSaveClose" 
                                                CollapseToSmall="WhenGroupIsMedium"
                                                telerik:ScreenTip.Description="{Loc SaveCloseObservationCategoryTooltip}"
                                                telerik:ScreenTip.Title="{Loc SaveClose}"
                                                Size="Medium"
                                                Command="{Binding Path=SaveCloseCommand}"
                                                Text="{Loc SaveClose}" 
                                                LargeImage="{StaticResource SaveAndClose16}"/>


                        </StackPanel>
                        <telerik:RadRibbonButton Name="buttonClose" 
                                                CollapseToSmall="WhenGroupIsMedium"                                          
                                                telerik:ScreenTip.Description="{Loc CloseTooltip}"
                                                telerik:ScreenTip.Title="{Loc Close}"
                                                Size="Large"
                                                Command="{Binding Path=CloseCommand}"
                                                Text="{Loc Close}"
                                                LargeImage="{StaticResource Close32}"/>
                    </telerik:RadRibbonGroup>
                </telerik:RadRibbonTab>
            </telerik:RadRibbonView>
            <Grid Grid.Row="1" Margin="10">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Label Grid.Column="0" Content="{Loc ObservationCategoryTitle}"/>
                    <TextBox Grid.Column="1" Text="{Binding ObservationCategory.Name, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"></TextBox>
                </Grid>

            </Grid>
        </Grid>
    </telerik:RadBusyIndicator>
</telerik:RadWindow>

Tina Stancheva
Telerik team
 answered on 20 Mar 2013
1 answer
170 views
Hi,

I have a semicirclewest gauge with three gaugeranges. These gaugeranges take up the entirety of the gauge. There is a range for the top, middle, and bottom sections. I was wondering if it would be possible to get the ends of the top and bottom ranges to have rounded edges. The attached image is what it should resemble. 

Thanks


<telerik:SemicircleWestScale.Ranges >
 
                            <telerik:GaugeRange x:Name="HighRange" Min=".75" Max="1.5" StartWidth=".2" EndWidth=".2" >
 
                                    <telerik:GaugeRange.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="Yellow" Offset="1"/>
                                            <GradientStop Color="#FFE61D1D" Offset="0"/>
                                        </LinearGradientBrush>
                                    </telerik:GaugeRange.Background>
 
                                </telerik:GaugeRange>
 
                                <telerik:GaugeRange x:Name="LowRange" Min="0" Max=".75" StartWidth=".2" EndWidth=".2" Background="Yellow">
 
                                </telerik:GaugeRange>
 
                                <!--Green Range-->
                                <telerik:GaugeRange x:Name="MidRange" Min="20" Max="80" StartWidth=".2" EndWidth=".2" Visibility="Collapsed" >
 
                                    <telerik:GaugeRange.Background>
                                        <LinearGradientBrush>
                                            <GradientStop Color="Yellow" Offset="0"/>
                                            <GradientStop Color="#FF00A91C" Offset=".1"/>
                                            <GradientStop Color="#FF00A91C" Offset=".9"/>
                                            <GradientStop Color="Yellow" Offset="1"/>
                                        </LinearGradientBrush>
                                    </telerik:GaugeRange.Background>
 
                                </telerik:GaugeRange>
 
                            </telerik:SemicircleWestScale.Ranges>
Andrey
Telerik team
 answered on 20 Mar 2013
5 answers
278 views

Hello,


I’m running into a problem with WPF telerik:RadGridView Q3 2011 and DynamicObject

1) I use DynamicObject and pattern MVVM and After edit data in grid, the “DynamicObject.TrySetMember(...)” is never called by telerik:RadGridView.
Note, with Telerik WPF Q1 2011 it work fine!

2) If use “Inherits” class, the telerik:RadGridView see and use only the properties of base class
for example I have one property named “UpperName” inside one class Inherited from another class and “UpperName” is never displayed by telerik:RadGridView

Thanks for any help!

Ps: I use Telerik WPF 2011.3.1316.40 for .NET 4 , Visual Studio 2010 (x86) , Windows 7 (x64)


File : MainWindow.xaml :

<Window x:Class="MainWindow"
        xmlns:system="clr-namespace:System;assembly=mscorlib"
        Title="MainWindow" Height="412" Width="629" xmlns:my="clr-namespace:System;assembly=mscorlib">
        <Grid>
        <telerik:RadGridView  AutoGenerateColumns="False" ItemsSource="{Binding}" Name="DataGridList" Margin="0,0,0,49">     
             
           <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Width="*" Header="Upper Name"  DataMemberBinding="{Binding Path=UpperName}"   />
                <telerik:GridViewDataColumn Width="*" Header="Product Name"  DataMemberBinding="{Binding Path=Name,Mode=TwoWay}"   />
                <telerik:GridViewDataColumn Width="*" Header="Product ID"     DataMemberBinding="{Binding Path=ID,Mode=TwoWay}"   />               
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
        <Button Content="Here TrySetMember is OK" Height="43" HorizontalAlignment="Left" Margin="12,0,0,0" Name="Button1" VerticalAlignment="Bottom" Width="267" />
         
    </Grid>
</Window>

File : MainWindow.xaml.vb :

Imports System.Collections.ObjectModel
 
Class MainWindow
 
    Private _ViewProducts As New ObservableCollection(Of VM_Product)
 
    Public Sub New()
 
        ' This call is required by the designer.
        InitializeComponent()
 
        ' Add any initialization after the InitializeComponent() call.
        Dim i As Integer
        Dim p As VM_Product
        Dim MyObject As Object
        For i = 0 To 10
            p = New VM_Product
 
            _ViewProducts.Add(p)
 
            'Here TrySetMember is OK !
            MyObject = _ViewProducts.Item(i)
            MyObject.ID = i
            MyObject.Name = "Name " & i
        Next
 
        'But : With telerik:RadGridView TrySetMember is never called after input data from telerik:RadGridView
        Me.DataGridList.BeginInit()
        Me.DataGridList.DataContext = _ViewProducts
        Me.DataGridList.EndInit()
    End Sub
 
    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        'Here TrySetMember is OK !
        Dim MyObject As Object = _ViewProducts.Item(0)
        MyObject.Name = TimeOfDay & " Changed by System.Dynamic TrySetMember "
    End Sub
End Class



Very simple Dynamic ViewModel inherits from System DynamicObject
File : VM_Dynamic.vb

Imports System.Dynamic
Imports System.ComponentModel
Imports System.Reflection
 
Public MustInherit Class VM_Dynamic
    Inherits DynamicObject
    Implements INotifyPropertyChanged
 
    Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
    Private _Entity As Object
 
    Public Property Entity() As Object
        Get
            Entity = _Entity
        End Get
        Set(value As Object)
            _Entity = value
        End Set
    End Property
 
    Public Overrides Function TryGetMember(ByVal binder As System.Dynamic.GetMemberBinder, ByRef result As Object) As Boolean
        Dim nProperty As PropertyInfo = _Entity.GetType().GetProperty(binder.Name)
 
        If nProperty Is Nothing OrElse nProperty.CanRead = False Then
            result = Nothing
            Return False
        End If
 
        result = nProperty.GetValue(_Entity, Nothing)
        Return True
    End Function
 
    Public Overrides Function TrySetMember(ByVal binder As System.Dynamic.SetMemberBinder, ByVal value As Object) As Boolean
        Dim nProperty As PropertyInfo = _Entity.GetType().GetProperty(binder.Name)
        If nProperty Is Nothing Or nProperty.CanRead = False Then Return False
 
        If nProperty.GetValue(Entity, Nothing) <> value AndAlso nProperty.CanWrite = True Then
            nProperty.SetValue(Entity, value, Nothing)
            RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(binder.Name))
        End If
 
        Return True
    End Function
 
    Protected Overridable Sub OnPropertyChanged(ByRef propertyName As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
    End Sub
 
End Class



Model "Product"
File : Product.vb

Public Class Product
    Private _ID As Integer
    Private _Name As String
 
    Public Property ID() As Integer
        Get
            ID = _ID
        End Get
        Set(value As Integer)
            _ID = value
        End Set
    End Property
 
    Public Property Name() As String
        Get
            Name = _Name
        End Get
        Set(value As String)
            _Name = value
        End Set
    End Property
 
End Class



"Product" View Model , inherits class "VM_Dynamic"
File : VM_Product.vb

Imports System.ComponentModel
  
Public Class VM_Product
    Inherits VM_Dynamic
 
    'This property is never called by telerik:RadGridView from XAML !!!
    Public ReadOnly Property UpperName() As String
        Get
            UpperName = StrConv(Me.Entity.Name, VbStrConv.Uppercase)
        End Get
    End Property
 
    Public Sub New()
        Me.Entity = New Product
    End Sub
End Class









Dimitrina
Telerik team
 answered on 20 Mar 2013
1 answer
41 views
Hi

In my app the application header is a Windows header.  I would like to replace with RadRibbonWindow.  I tried changing

From:
public partial class MainWindow : Window

To:
public partial class MainWindow : RadRibbonWindow

With that I get a compile error "Must not specify differrent base classes" 

I am using the latest Telerik libraries and Visual Studio 2012 express with update 1.

Thanks
Rich


Kiril Vandov
Telerik team
 answered on 20 Mar 2013
2 answers
334 views
Hi guys,

If you compare regular window to radwindow opening/closing time, you'll noticed that there is a little difference.
Is there any way to customize the wpf radwindow open/close speed, or remove the animation effects if there are any? 

Thank you.
KR,
JC
Jc
Top achievements
Rank 1
 answered on 20 Mar 2013
1 answer
94 views
Hello,

My trial is going well. But, I am a bit confused with the 'ribbon window'. 

I have replaced my standard MainWindow - with a RibbonWindow - this works. 

However, I would then like to add contents below my ribbon. I would like to match the following structure:
Ribbon Window
Ribbon
Dockable panels

I have managed to get the contents to appear under the ribbon using the grid element with a defined margin parameter:

<Grid Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Center" Width="auto" Margin="0 150 0 0">
         <telerik:RadDocking x:Name="radDocking">
             <telerik:RadSplitContainer>
                 <telerik:RadPaneGroup>

However, there must be a better method. Also, I am generally confused about how layout and size works within Telerik. I have set my width to 'auto' this automatically resizes the grid to fit the contents - what if I want the grid to be 100% of the available width?
Kiril Vandov
Telerik team
 answered on 20 Mar 2013
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?