Telerik Forums
UI for WPF Forum
3 answers
174 views

Hi,

Is it possible to select different visual template/theme dynamically in code to handle different type of alert. For example red background for critical message while blue background is for normal alert.

Thanks.

Martin Ivanov
Telerik team
 answered on 31 Aug 2018
3 answers
151 views
Hi there
How can I Dispose events handled for each cell created in CreateCellElement method in a custom column ?
In my RadGridView I use a CustomChechBoxColumn  in which Cells are created By CreateCellElement(). and each cell is subscribed to  checked/Unchecked events. every thing is ok BUT when RowVirtualization and  ColumnVirtualization are enabled , it dosen't work properly.
Martin Ivanov
Telerik team
 answered on 31 Aug 2018
6 answers
238 views

Hi,

 

I'm creating a radgridview from an existing datatable. I need one column to have all its cells as hyperlinks to a directory.

I tried:

GridViewHyperlinkColumn gridViewHyperlinkColumn = new GridViewHyperlinkColumn()
{
Header = "test",
TargetName = "c://" + rowValue
};
 
gridViewHyperlinkColumn.PreviewMouseDown += OpenTarget;
 
datarow[column] = gridViewHyperlinkColumn;

 

 

But the cell shows the following result: Telerik.Windows.Controls.GridViewHyperlinkColumn instead of showing the row value underlined.

 

Can anyone help me?

 

Regards


Ricardo
Top achievements
Rank 1
 answered on 30 Aug 2018
1 answer
160 views

Telerik version: 2018.2.820.40, Visual Studio 2017, Theme Method = StyleManager, Theme Applied = ExpressionDark, MVVM

  1. When a tile is disabled, all controls within it were disabled.
  2. When a tile is re-enabled, all RadTabItem's Header are not refreshed. It's text foreground remains white color (expect black).
  3. When the tile is Maximized/Minimized, the RadTabItem's Headers are refreshed.
  4. I couldn't reproduce this abnormality in a simple project.

 

<telerik:RadTileView Grid.Row="1" IsEnabled="{Binding CanAccess, Mode=OneWay}"
                     ItemsSource="{Binding TestBoardCollection, Mode=OneWay}"
                     Style="{StaticResource tileStyle}"/>

 

<telerik:RadTabControl ItemsSource="{Binding TestSiteCollection, Mode=OneWay}" IsContentPreserved="True">
    <telerik:RadTabControl.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding TestSiteName, Mode=OneWay}"/>
        </DataTemplate>
    </telerik:RadTabControl.ItemTemplate>
    <telerik:RadTabControl.ContentTemplate>
        <DataTemplate>
            <ContentControl cal:View.Model="{Binding}"  Margin="0,8,0,0"/>
        </DataTemplate>
    </telerik:RadTabControl.ContentTemplate>
</telerik:RadTabControl>
Dilyan Traykov
Telerik team
 answered on 30 Aug 2018
1 answer
108 views

Hi,

 

I have a RadGrid created via code behind, all data is of type String.

 

When i try to group any of the columns i get the following error:

System.InvalidCastException: 'Specified cast is not valid.'

 

More details:

 

System.InvalidCastException
  HResult=0x80004002
  Message=Specified cast is not valid.
  Source=PresentationFramework
  StackTrace:
   at System.Windows.Controls.Border.get_BorderThickness()
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
   at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
   at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at MyModule.App.Main()

I have no idea of what is wrong. Can anyone help me?

Ricardo
Top achievements
Rank 1
 answered on 30 Aug 2018
6 answers
318 views
draw pencil tool

# Mouse Action :  Left,Right,Down,.... (loop)  - OK
# Mouse Action : Left,Right,...(loop) -  bug? :    problem line

to show attach file(line.jpg) for detail information
Martin Ivanov
Telerik team
 answered on 30 Aug 2018
1 answer
198 views

The behavior of the lines on the treeview and treelistview are not what we would like.If you see the attachment, I have drawn a red line where I want the tree line of the parent to continue to end bottom of the last descendent, NOT end at the last direct child. This would be the case at any level not just the root. Is there any way to do that?

 

Also applies to treelistview. I'd just rather not post the exact same thing there as well.

 

Thanks.

Vladimir Stoyanov
Telerik team
 answered on 29 Aug 2018
1 answer
252 views
hello I can not find ViewCellFormatting in radgridview in wpf !
Vladimir Stoyanov
Telerik team
 answered on 29 Aug 2018
1 answer
402 views
I have a RadTimeSpanPicker with some Binding validation implemented. I want to immediately show the validation tooltip if a binding validation error occurs (see attached screenshot).  Currently, the tooltip only shows when the mouse hovers over the upper right corner.  However, this corner is so small it's difficult to position the mouse over it to see the error message.  How do I immediately display this tooltip when the error is detected?
Vladimir Stoyanov
Telerik team
 answered on 29 Aug 2018
4 answers
408 views

Hi,

 

I'm following the example of RestoredTilesToSpanMultipleRowsAndColumns_WPF.

 

I want to define dynamic rows/columns. I tried the following:

<Style x:Key="tileViewPanel" TargetType="telerik:RadTileView">
    <Style.Resources>
        <System:Object x:Key="RowsCount"/>
        <System:Object x:Key="ColumnsCount"/>
    </Style.Resources>
    <Setter Property="ItemsPanel">
        <Setter.Value>
            <ItemsPanelTemplate>
                <local:Multicolumns RowsCount="{DynamicResource RowsCount}" ColumnsCount="{DynamicResource ColumnsCount}"/>
            </ItemsPanelTemplate>
        </Setter.Value>
    </Setter>
</Style>

 

Error:

System.Windows.Markup.XamlParseException: 'A 'DynamicResourceExtension' cannot be set on the 'RowsCount' property of type 'TemplateForm'. A 'DynamicResourceExtension' can only be set on a DependencyProperty of a DependencyObject.'

 

I also tried:

 

<Style x:Key="tileViewPanel" TargetType="telerik:RadTileView">
            <Style.Resources>
                <System:Object x:Key="RowsCount"/>
                <System:Object x:Key="ColumnsCount"/>
            </Style.Resources>
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <local:Multicolumns RowsCount="{Binding RowsCount}" ColumnsCount="{Binding ColumnsCount}"/>
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
        </Style>

Error:

System.Windows.Markup.XamlParseException: 'A 'Binding' cannot be set on the 'RowsCount' property of type 'TemplateForm'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.'

Does anyone knows how i can define dynamic rows/columns for this example?

 

Regards

 

Ricardo
Top achievements
Rank 1
 answered on 28 Aug 2018
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
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?