Telerik Forums
UI for WPF Forum
1 answer
77 views
Hi,
Am I able to freeze rows in the TreeListView ?

Best regards & have a nice holidays :)
Kristján.
Vlad
Telerik team
 answered on 28 Dec 2012
0 answers
104 views
Hey guys
I am newbie in Telerik WPF Dev, I have a trouble with implementation of telerik already prepared examples. For example here is one link

http://demos.telerik.com/silverlight/#GridView/Selectors/StyleSelectors/RowStyleSelector

Under the code we can notice

xmlns:Examples="clr-namespace:Telerik.Windows.Examples"

and further down xaml tag

<Examples:UnitPriceConveter x:Key="converter" />

How to get access to that 'Examples',
how to implement the example to make it work with my DataTable as my DataSource.
I could not find any info of how to make these examples to work with DataTable.

If you will explain or provide at least one example of how to go around that 'Examples:' tag and of how to use DataTable as DataSource I will be ok

Thanks
 
Lukasz
Top achievements
Rank 1
 asked on 27 Dec 2012
4 answers
152 views
I have a RadDataForm that contains a number of fields.

When I add a DataFormDateField and bring up the form in ReadOnly mode, the field is disabled.  When I add a DataFormDataField that contains a RadDateTimePickerand bring up the form in ReadOnly mode, the field is not disabled.

In other words, this works:
<telerik:DataFormDateField
    Label="Contact Date"
    DataMemberBinding="{Binding Path=contactdt}"
    />

And this does not:
<telerik:DataFormDataField
    Label="Contact Date"
    >
    <telerik:RadDateTimePicker
        SelectedValue="{Binding Path=contactdt}"
    />
</telerik:DataFormDataField>

Is there a way to get a DataFormDataFields contained controls to respond to the form's Mode?
Jeff
Top achievements
Rank 1
 answered on 27 Dec 2012
1 answer
360 views
Hi,

The following works when the context menu is declared in the TreeView directly.
<telerik:RadTreeView Name="radTreeView" ExpanderStyle="{StaticResource ExpanderStyle}" ItemsSource="{Binding Path=EnvironmentMenuDataSource}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" ItemTemplate="{StaticResource EnvironmentMenu}">
                                    <telerik:RadContextMenu.ContextMenu>
                                        <telerik:RadContextMenu Opened="RadTreeViewContextMenuOpened">
                                            <telerik:RadMenuItem Header="{Binding Path=SelectedItem.ContextCommandName}"  Command="{Binding Path=ViewListCommand}" CommandParameter="{Binding SelectedItem}">
                                                <telerik:RadMenuItem.Icon>
                                                    <Image Source="../Images/Menu/Blue.png" Stretch="Uniform" />
                                                </telerik:RadMenuItem.Icon>
                                            </telerik:RadMenuItem>
                                        </telerik:RadContextMenu>
                                    </telerik:RadContextMenu.ContextMenu>
                                </telerik:RadTreeView>

However when placed my context menu inside the Data template as I only want a context menu with leave items,
<DataTemplate x:Key="EntityMenu">
           <Grid>
               <Grid.ColumnDefinitions>
                   <ColumnDefinition Width="0.35*"/>
                   <ColumnDefinition Width="0.65*"/>
               </Grid.ColumnDefinitions>
               <Image Source="{Binding ImageUrl, Mode=OneWay}" Width="16" Height="16"/>
               <TextBlock Margin="3,0,0,0" Grid.Column="1" TextWrapping="Wrap" Text="{Binding Name, Mode=OneWay}">
                    <telerik:RadTreeView Name="radTreeView" ExpanderStyle="{StaticResource ExpanderStyle}" ItemsSource="{Binding Path=EnvironmentMenuDataSource}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" ItemTemplate="{StaticResource EnvironmentMenu}">
                                   <telerik:RadContextMenu.ContextMenu>
                                       <telerik:RadContextMenu Opened="RadTreeViewContextMenuOpened">
                                           <telerik:RadMenuItem Header="{Binding Path=SelectedItem.ContextCommandName}"  Command="{Binding Path=ViewListCommand}" CommandParameter="{Binding SelectedItem}">
                                               <telerik:RadMenuItem.Icon>
                                                   <Image Source="../Images/Menu/Blue.png" Stretch="Uniform" />
                                               </telerik:RadMenuItem.Icon>
                                           </telerik:RadMenuItem>
                                       </telerik:RadContextMenu>
                                   </telerik:RadContextMenu.ContextMenu>
                               </telerik:RadTreeView>
               </TextBlock>
           </Grid>
       </DataTemplate>
       <HierarchicalDataTemplate x:Key="EnvironmentMenu" ItemTemplate="{StaticResource EntityMenu}"
          ItemsSource="{Binding EntityMenus}">
           <TextBlock Text="{Binding Name}" />
       </HierarchicalDataTemplate>

it does not work anymore. I tried to change the binding with the relativesouce but no luck. we are using the MVVM. The commands are in the ViewModel of the view.

Do you have any examples with it?

Thanks
Pavel R. Pavlov
Telerik team
 answered on 27 Dec 2012
8 answers
237 views
Hi,

I experienced a problem in my developing the WPF application. The application consists of a RadScheduleView and many WPF Hyperlink items. Once the ScheduleView is on focus, then I click on any Hyperlink, the application hangs and shows "InvalidOperationException" in Debug mode, saying that Hyperlink is not a Visual or Visual3D.

Full stacktrace is captured as follow:
System.InvalidOperationException was unhandled
  Message='System.Windows.Documents.Hyperlink' is not a Visual or Visual3D.
  Source=PresentationCore
  StackTrace:
       at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
       at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
       at Telerik.Windows.Controls.ScheduleViewBase.ScheduleViewLostFocus(Object sender, RoutedEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.InlineEditing.cs:line 368
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.OnLostFocus(RoutedEventArgs e)
       at System.Windows.UIElement.IsFocused_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)
       at System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key)
       at System.Windows.Input.FocusManager.OnFocusedElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.FrameworkContentElement.OnGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
       at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
       at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
       at System.Windows.ContentElement.Focus()
       at System.Windows.Documents.Hyperlink.OnMouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       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)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run()
       at WpfApplication1.App.Main() in C:\Segantii\Development\Samples\Telerik\MonthViewTickStyle\WpfApplication1\WpfApplication1\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

There will be no error if I click other UI element (e.g. TextBox) after ScheduleView is on focus.
And I cannot find the way to catch the Exception, thus the application will hang once user click on Hyperlink after ScheduleView is on focus.

Is that a bug?
Thanks a lot!

Frankie
Vladi
Telerik team
 answered on 27 Dec 2012
1 answer
125 views
Hi. I implement IDataErrorInfo in my ViewModel's class. I use RadDataForm that bind to simple source from viewmodel. When i start project i have exception (TargetParameterCountException Parametr count mismatch). What is wrong?
Alex
Top achievements
Rank 1
 answered on 27 Dec 2012
5 answers
321 views
Hi,

we would like to create a CustomControl that derives from a RadComboBox with a special ItemTemplate. On our first approach we tried it with a usual combox by adding to following lines to the Generic.xaml file of the project:
<Style TargetType="{x:Type local:ComboBoxLookupDataMaterialMainGroups}" BasedOn="{StaticResource {x:Type ComboBox}}">
    <Setter Property="ItemTemplate">
        <Setter.Value>
            <DataTemplate >
                 Individual Template Definition
            </DataTemplate>
        </Setter.Value>
    </Setter>
</Style>

It worked as expected so we changed the baseclass of the custom control to a RadComboBox, searched for the correct "BasedOn" content and changed it to:
<Style TargetType="{x:Type local:ComboBoxLookupDataMaterialMainGroups}" BasedOn="{StaticResource RadComboBoxStyle}">

Because the RadComboBoxStyle was unknown, we also added the implicit theme XAMLs
  • Telerik.Windows.Controls.XAML and
  • Telerik.Windows.Controls.Input.XAML

to the project's theme folder and added the following includes to the Generic.XAML:
<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Telerik.Windows.Controls.xaml" />
    <ResourceDictionary Source="Telerik.Windows.Controls.Input.xaml" />
</ResourceDictionary.MergedDictionaries>

The whole project is just a WPF control assembly that is used by another WPF application project, so it doesn't contain an App.xaml file.

After starting the application it hangs with a XAMLObjectWriterException: Zeilennummer "7" und Zeilenposition "10" von "Beim Festlegen der Eigenschaft "System.Windows.ResourceDictionary.Source" wurde eine Ausnahme ausgelöst.".

Maybe it's just a small missing piece but it also might be a fundamental lack of knowledge since we are new to WPF. Could you please help us out?

Thanks!
David
Yana
Telerik team
 answered on 27 Dec 2012
1 answer
91 views
Hi
please let me know if the command is available in numeric control?

Thanks,
Akram
Yana
Telerik team
 answered on 27 Dec 2012
10 answers
375 views
Hello,

i'm testing the autocompletebox, and so far i like it. But i have 3 questions:
1.) Is there a way to set the DisplayMemberPath? The property has no effect.
2. ) The autocompletemode doesn't work. I'm trying to use the mode "SuggestAndAppend", but it does neither. Also tried the other modes, but the control only filters the entries, but doesn't Highlight a match or autocomplete the value in the TextBox.
3.) is there am easy way to select all text on Focus?

Regards
Michael
Miroslav Nedyalkov
Telerik team
 answered on 27 Dec 2012
26 answers
360 views
Hi, 
I've tried Xmla Data Provider. It works great but If I have several databases on same SSAS server, it takes always the first one. 
I have a RadPivotFieldList and a RadPivotGrid: RadPivotFieldList updates fields list correctly and accordingly to the specified database/cube but RadPivotGrid connects to wrong database (the first in analysis services).

Is there a way to specify the correct catalog with Xmla data provider? 
My configuration is: 

<telerikDataProviderXmla:XmlaDataProvider x:Key="dataProvider">
            <telerikDataProviderXmla:XmlaDataProvider.ConnectionSettings>
                <telerikDataProviderXmla:XmlaConnectionSettings 
                    Cube="MY_CUBE"
                    Database="MY_DATABASE_01"
                    ServerAddress="http://MY_WEBSERVER:8888/msmdpump.dll" />
            </telerikDataProviderXmla:XmlaDataProvider.ConnectionSettings>
        </telerikDataProviderXmla:XmlaDataProvider>

In this case, if I have also MY_DATABASE_00 it connects to MY_DATABASE_00.

Many thanks in advance!
Regards!
Davide

Milan
Telerik team
 answered on 27 Dec 2012
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?