Telerik Forums
UI for WPF Forum
2 answers
95 views
Hi All,
what purpose for Appointment.Location?

Tanks.
Wenjie
Top achievements
Rank 1
 answered on 23 Jul 2013
9 answers
141 views
IHi,

I have a grouping action event (see below) that fires when as a user I drop a column into the grouping area.  I also get the action event when I close the group.  However, when I create the group descriptor pro-grammatically (see below) the action event does not fire but the group   displays properly.  When I close the  group pro-grammatically created group I get the action event but  the program crashes.  What am i missing?

        private void CreateGroup_Click(object sender, RoutedEventArgs e)
        {
            GroupDescriptor descriptor = new GroupDescriptor();
            descriptor.Member = "CategoryName";
            descriptor.SortDirection = ListSortDirection.Ascending;
            this.gridQueryResult.GroupDescriptors.Add(descriptor);
           
            descriptor = new GroupDescriptor();
            descriptor.Member = "ProductName";
            descriptor.SortDirection = ListSortDirection.Ascending;
            this.gridQueryResult.GroupDescriptors.Add(descriptor);           
        }

private void gridQueryResult_Grouping(object sender, GridViewGroupingEventArgs e)
        {
            Telerik.Windows.Controls.GridViewColumn column = ((ColumnGroupDescriptor)e.GroupDescriptor).Column;

            if (e.Action == GroupingEventAction.Place)
            {
                if (column != null)
                    column.IsVisible = false;
            }
            else if (e.Action == GroupingEventAction.Remove)
            {
                if (column != null)
                    column.IsVisible = true;
            }
        }
Richard Harrigan
Top achievements
Rank 1
 answered on 23 Jul 2013
2 answers
479 views
Hello,
I have set the SelectionMode="Extended" on my RadListBox; however the behavior identical to "Multiple", whereas Shift and Ctrl have no effect.  Below is my Xaml...

<telerik:RadListBox ItemsSource="{Binding MasterViewModel.ElementTypeCollectionView}"
                    Margin="3"
                    BorderThickness="0"
                    SelectionMode="Extended">
    <telerik:RadListBox.ItemTemplate>
        <DataTemplate>
            <CheckBox Checked="CheckBox_Checked"
                      IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadListBoxItem}}, Path=IsSelected}">
                <CheckBox.Content>
                    <TextBlock>
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0}  {1}">
                                <Binding Path="ElementTypeCode" />
                                <Binding Path="Description" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </CheckBox.Content>
            </CheckBox>
        </DataTemplate>
    </telerik:RadListBox.ItemTemplate>
</telerik:RadListBox>

Is this a known bug or am I missing something?

Thanks in advance,
Steve



Steve
Top achievements
Rank 1
 answered on 23 Jul 2013
1 answer
151 views
I have the following XML generated by the SaveLayout method:

<?xml version="1.0" encoding="utf-8" ?>
- <RadDocking>
- <SplitContainers>
- <RadSplitContainer Dock="DockedLeft" Width="200">
- <Items>
- <RadPaneGroup SelectedIndex="0">
- <Items>
<RadPane IsDockable="True" Header="Left" CanDockInDocumentHost="False" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
- <RadSplitContainer Dock="DockedRight" Width="200">
- <Items>
- <RadPaneGroup SelectedIndex="0">
- <Items>
<RadPane IsDockable="True" Header="Right" CanDockInDocumentHost="False" />
</Items>
</RadPaneGroup>
</Items>
</RadSplitContainer>
- <RadMainSplitContainerExt SerializationTag="RadSplitContainer" Dock="DockedLeft">
- <Items>
- <RadPaneGroup SelectedIndex="0">
- <Items>
<RadPaneExt SerializationTag="RadPane" IsDockable="True" Header="Pane" CanUserPin="False" CanDockInDocumentHost="False" />
</Items>
</RadPaneGroup>
- <RadPaneGroup SelectedIndex="0">
- <Items>
<RadPaneExt SerializationTag="RadPane" IsDockable="True" Header="Pane" CanUserPin="False" CanDockInDocumentHost="False" />
</Items>
</RadPaneGroup>
</Items>
</RadMainSplitContainerExt>
</SplitContainers>
</RadDocking>

When I execute the LoadLayout method with this XML, I receive this exception:

Specified argument was out of the range of valid values.
Parameter name: elementTypeName

Any help would be appreciated - thanks.
Vladi
Telerik team
 answered on 23 Jul 2013
1 answer
131 views
Hi, 

Does the Timeline control support multi-grouping, for instance I havea Group 1 when expanded it displays child groups and when child groups are expanded the related events are then displayed.

Thanks
Tsvetie
Telerik team
 answered on 23 Jul 2013
1 answer
121 views
Nevermind, I found this
Dimitrina
Telerik team
 answered on 23 Jul 2013
1 answer
76 views
Hi,

I have a RadDataFilter whose Source property is bound to ObservableCollection and AutoGenerateItemPropertyDefinitions is set to false:

            <telerik:RadDataFilter Name="radDataFilterSessions" Margin="-15,0,0,0"
                               MaxWidth="600" AutoGenerateItemPropertyDefinitions="False"
                               Source="{Binding DomainContext.Sessions}">
            </telerik:RadDataFilter>
            
Properties to filter are manually defined:
            
            radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Name", typeof(string), "Name"));
            radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Description", typeof(string), "Description"));
            radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Recorded", typeof(DateTime), "Recorded"));
            radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Duration", typeof(TimeSpan), "Duration"));
            
There seems to be problem with Duration (TimeSpan) property. I can add filter item with this property. I can change value and filter, but when I try to remove this filter item (remove a filter by using RadDataFilter's UI remove button), I got NullReferenceException:

at Telerik.Windows.Controls.Data.DataFilter.FilterEditorFactory.TimeSpanEditorConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataFilter\Editors\FilterEditorFactory.cs:line 256
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
   at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Run(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   
   
No problems with String and DateTime properties. I am using 2013.2.611.45 build.
Rossen Hristov
Telerik team
 answered on 23 Jul 2013
1 answer
279 views
hello
I have builder  a Telerik project as below,but when running  it went wrong,the errorMessage(InnerException) is  "Unable to find the name "mystyle" resources. The resource name is case-sensitive.",How can I achieve this?
thanks!
//RadElips.xaml
<telerik:RadWindow x:Class="WpfApplication1.RadElips"
  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"
  Header="RadElips" Height="300" Width="300">
    <telerik:RadWindow.Resources>
        <!--<Style  x:Key="mystyle1" TargetType="{x:Type Control}" >
            <Setter Property="Background" Value="Black"></Setter>
            <Setter Property="Foreground" Value="WhiteSmoke"></Setter>
            <Setter Property="FontSize" Value="18"></Setter>
            <Style.Triggers>
                <Trigger Property="IsMouseOver"  Value="True">
                    <Setter Property="Background" Value="Blue"></Setter>
                    <Setter Property="Foreground" Value="Green"></Setter>
                </Trigger>
            </Style.Triggers>
        </Style>-->
      
    </telerik:RadWindow.Resources>
    <Grid>
        <StackPanel>
            <Ellipse x:Name="elipse1" Stroke="Red" Height="120" Width="120"  StrokeThickness="6" Fill="Green"  ></Ellipse>
            <Button x:Name="btn01" Content="ok" Width="90" Height="38" Style="{StaticResource mystyle}"></Button>
        </StackPanel>
    </Grid>
</telerik:RadWindow>
//app.xaml
<Application x:Class="WpfApplication1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           >
    <Application.Resources>
        <Style x:Key="mystyle">
            <Setter Property="Control.Background" Value="Black"></Setter>
            <Setter Property="Control.Foreground" Value="White"></Setter>
        </Style>
    </Application.Resources>
</Application>
//app.xaml.cs
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using Telerik.Windows.Controls;
namespace WpfApplication1
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            StyleManager.ApplicationTheme = new Windows8Theme();
        }
        protected override void OnStartup(StartupEventArgs e)
        {
         //Telerik Window - RadElips
            RadElips   radelips= new RadElips();
            radelips.Show();
            base.OnStartup(e);
        }
    }
}

Yana
Telerik team
 answered on 23 Jul 2013
2 answers
253 views
I'm sorry, ask so many questions。

I  have builder a  RadControlsWPF Application with  implicit style 
No matter when running, or design,can't show Window as a main  RadWindow,How can i solve this problem

thanks !
Kalin
Telerik team
 answered on 23 Jul 2013
1 answer
933 views
I have a RadGridView and in this RadGridView I have the following column:

<telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding Revoked}" AutoSelectOnEdit="True" Header="Revoked" UniqueName="Revoked" Width="Auto" IsReadOnly="False" FooterTextAlignment="Right" CellStyle="{StaticResource GridCellStyle}" />


I want to either enable/disable or set the read only flag on another two columns in the grid based on the checkbox column.

 
<telerik:GridViewDataColumn
     DataMemberBinding="{Binding RevokedBy}"
     Header="Revoked By"
     UniqueName="RevokedBy"
     Width="Auto"
     IsReadOnly="{Binding Revoked}"
     FooterTextAlignment="Right"
     CellStyle="{StaticResource GridCellStyle}" />
 
 <telerik:GridViewDataColumn
     DataMemberBinding="{Binding RevokedDateTime}"
     DataFormatString="dd/MM/yyyy HH:mm:ss"
     Header="Revoked Date Time"
     UniqueName="RevokedDateTime"
     Width="Auto"
     IsReadOnly="{Binding Revoked}"
     FooterTextAlignment="Right"
     CellStyle="{StaticResource GridCellStyle}">
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <WrapPanel Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="4">
                <telerik:RadDateTimePicker
                    Margin="0 5 5 5"
                    Width="250"
                    DisplayFormat="Short"                                    
                    InputMode="DatePicker"
                    DateSelectionMode="Day"
                    DateTimeWatermarkContent="Select Date"
                    MaxWidth="155"
                    MinWidth="155"
                    SelectedDate="{Binding RevokedDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
  
                <telerik:RadMaskedDateTimeInput
                    Margin="5"
                    Culture="en-GB"
                    EmptyContent="Enter Time"
                    InputBehavior="Replace"
                    Mask="HH:mm:ss"
                    SelectionOnFocus="SelectAll"
                    TextMode="MaskedText"
                    Value="{Binding RevokedTime, Mode=TwoWay}"/>
            </WrapPanel>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
 </telerik:GridViewDataColumn>


So far I have tried binding the `IsReadOnly` and `IsEnabled` property to `Revoked` but this doesn't seem to work, and I can see that the `Revoked` property is being set and the `RaisePropertyChanged` event is recurring.

Any help would be much appreciated.

Further details of the code in the ViewModel

/// <summary>
/// The agreements.
/// </summary>
private ObservableCollection<NotificationAgreement> agreements;
 
/// <summary>
/// Gets or sets the agreements.
/// </summary>
public ObservableCollection<NotificationAgreement> Agreements
{
    get
    {
        return this.agreements ?? (this.agreements = new ObservableCollection<NotificationAgreement>());
    }
 
    set
    {
        this.agreements = value;
        this.RaisePropertyChanged(() => this.Agreements);
    }
}



And the NotificationAgreement class has the following property.

/// <summary>
/// Gets or sets a value indicating whether revoked.
/// </summary>
public bool Revoked
{
    get
    {
        return this.revoked;
    }
 
    set
    {
        this.revoked = value;
        this.RaisePropertyChanged(() => this.Revoked);
    }
}



Yoan
Telerik team
 answered on 23 Jul 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
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?