Telerik Forums
UI for WPF Forum
1 answer
456 views

 

Hello,

 

In our project we must create a DataTemplate for a grid cell programmatically. Everything works perfect, but a click to a button within the template does not work.

Here is a snippet of the code:

var cellEditTemplate = new DataTemplate();

var dockPanel = new FrameworkElementFactory( typeof( DockPanel ) );
dockPanel.SetValue( DockPanel.LastChildFillProperty, true );

var textBlock = new FrameworkElementFactory( typeof( TextBlock ) );
textBlock.SetValue( FrameworkElement.StyleProperty, textBlockStyle );
textBlock.SetBinding( TextBlock.TextProperty, binding );
textBlock.SetValue( DockPanel.DockProperty, Dock.Left );

var button = new FrameworkElementFactory( typeof( RadButton ) );
button.SetValue( FrameworkElement.StyleProperty, buttonStyle );
button.SetValue( ContentControl.ContentProperty, "Press me" );
button.SetValue( FrameworkElement.MinWidthProperty, 0.0 );
button.SetValue( DockPanel.DockProperty, Dock.Right );
button.AddHandler( Button.ClickEvent,
                   new RoutedEventHandler( ( sender, args ) =>
                                           {
                                               int i = 0;
                                               i++;
                                           } ) );


button.SetValue( Button.CommandProperty );

dockPanel.AppendChild( button );
dockPanel.AppendChild( textBlock );

cellEditTemplate.VisualTree = dockPanel;
cellEditTemplate.Seal();

 

The event handler is not called.

 

Best regards,

   Michael

 

 

Vladimir Stoyanov
Telerik team
 answered on 15 Jan 2019
1 answer
943 views

Is there a way to find out if the RadListBox.SelectionChanged event was triggered by user input (mouse click, touch, tabbing, keyboard input...) vs programmatically (by setting datacontext, binding, or  setting RadListBox.SelectedItem in code behind)?

Vladimir Stoyanov
Telerik team
 answered on 15 Jan 2019
1 answer
101 views
Is there a way for cancelling an individual download, or can you only call RequestCancel (which cancels all uploading items)?
Vladimir Stoyanov
Telerik team
 answered on 14 Jan 2019
1 answer
58 views
How to implement AutomationID to charts (RadCartesianChart) datapoints? 
Martin Ivanov
Telerik team
 answered on 14 Jan 2019
3 answers
75 views

Hi,

Can anyone help me with this problem. Please look here:

http://prntscr.com/m4t10v

The code of my GridView:

 

<telerik:RadGridView x:Name="GV_ProjectTerms" AutoGenerateColumns="False" Margin="10" RowIndicatorVisibility="Collapsed" ShowSearchPanel="False" CanUserFreezeColumns="False" CanUserReorderColumns="False" DragElementAction="None" IsFilteringAllowed="False" ShowGroupPanel="False">

Vladimir Stoyanov
Telerik team
 answered on 11 Jan 2019
2 answers
272 views

I'm using 2017.3.1018.45 on 64-bit Windows 10 and Visual Studio 2017.

My application has a single chart view. I can change the data that is displaying. The DataContext changes out from under the view. When the DataContextChanged message arrives, I:

   1. save the current pan/zoom settings for the chart.

   2. clear all series.

   3. generate all series for the new data context

   4. restore the pan/zoom settings that were saved from the last time this data was displayed.

Except that it doesn't work at all. I have tried saving and restoring: Zoom, PanOffset, Horizontal/Vertical-ZoomRange-Start/End.

At first, I tried just saving/restoring Zoom and PanOffset. I could successfully set the Zoom, but the PanOffset was always (0,0) after the set.

I have tried invoking my restore operation on the dispatcher during Idle, so it should be done after everything has been complete.

Any ideas?

-John.

 

 

Reilly
Top achievements
Rank 1
Veteran
 answered on 11 Jan 2019
3 answers
164 views

Hello,

Is there a way of customizing the appointment stack behavior when 2 or more items are overlapping on the timeline view?

Currently, the longest appointment will appear on top of the stack.

I would like to change this behavior so that the order of the stack is not calculated based on the length of the appointment but rather on a custom attribute or by the order in which the appointments are added.

 

 

Joel
Top achievements
Rank 1
Iron
 answered on 11 Jan 2019
4 answers
217 views

Hello,

I have read the post on modifying RadChart Candlestick to display the median and therefore be a Box Plot / Box Whisker. http://docs.telerik.com/devtools/wpf/controls/radchart/how-to/howto-create-scatter-errorbars-and-boxplot-series

I would like to achieve this same effect using RadChartView, as I would like the implicit styles that ChartView provide over Chart. 

Please could you provide guidance on how I should go about adding a median line to the candlesticks in RadChartView 

Many thanks in advance.

Martin Ivanov
Telerik team
 answered on 11 Jan 2019
2 answers
119 views

Finally upgrading my controls..

How in the 'world' do I convert my Schedule to ScheduleView?

I assume NO MORE Scheduler?

 

Help!!!!!!!!!!!!!!

 

 

   <telerik:RadScheduler Name="radSchedule" telerik:StyleManager.Theme="{StaticResource MyThemeInstance}"  AppointmentTemplate="{StaticResource AppointmentTemplateFLOM}"
                              TimeRulerHostStyle="{StaticResource TimeRulerHostStyleFLOM}"
                              TimeSlotTemplateSelector="{StaticResource TimeSlotTemplateSelector}" ViewMode="Week"  
                              TimelineHeaderFormat="{}{0:M-d-yyyy}"
                              AppointmentEditing="radSchedule_AppointmentEditing"                            
                              SelectedViewStartDateChanged="radSchedule_SelectedViewStartDateChanged" AllDayAreaHeight="0" AllowDrop="False" FontSize="14" IsEnabled="True" AppointmentAdding="radSchedule_AppointmentAdding" AppointmentDeleting="radSchedule_AppointmentDeleting" AppointmentCreating="radSchedule_AppointmentCreating" IsReadOnly="False">
            <telerikScheduler:RadScheduler.WeekViewDefinition>
                <telerikScheduler:WeekViewDefinition DayStartTime="0:00:00" VisibleDays="7" DayEndTime="23:00:00" TimeSlotLength="0:15:0" LargeChangeInterval="7d" />
            </telerikScheduler:RadScheduler.WeekViewDefinition>
            <telerikScheduler:RadScheduler.DayViewDefinition>
               <telerikScheduler:DayViewDefinition DayStartTime="0:00:00" DayEndTime="23:00:00" TimeSlotLength="0:15:0" />  <!--HEIGHT OF APPT -->
            </telerikScheduler:RadScheduler.DayViewDefinition>
          
             </telerik:RadScheduler>

Sullivan
Top achievements
Rank 1
 answered on 11 Jan 2019
3 answers
397 views

Hi,

I want my QueryableCollectionView Filter on event which invoke this function in my mainViewModel. Under is my attempt to filter this.

 

        private async Task OnContractGroupSelectionChanged()
        {
            this.ViewModelCategory.ViewModelCategory= new QueryableCollectionView(this.ViewModelCategory.CategoryData.Where(c => c.ID== this.SectionViewModle.ID));

        }

 

As you can see, I'm "newing" / creating a new instance of the QueryableCollectionView each time I choose a section in a grid.

How can I filter the QueryableCollectionView to only show items which is equal to the SectionID without having to new up an instance of the QueryableCollectionView? I can only choose one section at once, which means each time I choose a section, the QueryableCollectionView will only show the items with the same ID as the section.  I tried to add a FilterDescriptor in my MainViewModel which should update QueryableCollectionView  in my ViewModelCategory, but my program just hangs up when I try to do that.

Yoan
Telerik team
 answered on 10 Jan 2019
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?