Telerik Forums
UI for WPF Forum
2 answers
628 views

I have a Main form with a tab control where I am trapping the tab change event in the view model.

<i:Interaction.Triggers>
                <i:EventTrigger EventName="SelectionChanged">
                    <i:InvokeCommandAction Command="{Binding TabChanged}"
                             CommandParameter="{Binding ElementName=TCMain}" />
                </i:EventTrigger>
</i:Interaction.Triggers>

Note the element name

In my view model I successfully trap the event for processing relying on the name to identify the tab control

private void tabChanged(object o)
{
    if (o == null) { return; }
    if (o.GetType() == typeof(Telerik.Windows.Controls.RadTabControl))
    {
        if ((o as Telerik.Windows.Controls.RadTabControl).Name != "TCMain")
        {
            return;
        }
    }
}

One of the main window tab items also has a user control which has a tab control called UCTab, it has no tabchanged event processing.

When I change tabs on the UCTab the event on TCMain fires and the name passed to the event in the view model is the TCMain tab.

Is it possible to isolate the UCTab from the event processing.

(I have solved this by changing the UCTab to a standard MS tab control but it is very unsatisfactory).

I have a sample project to demonstrate the problem if required.

 

 

 

 

 

 

 

Mark
Top achievements
Rank 1
 answered on 28 Mar 2017
15 answers
416 views
Hi,

 

I'm developing a new feature with Schedule View, where  i need to add a drag & drop feature and allow merging two appointments if they are dragged over another.

Is it possible to acomplish that? I have an event - OnAppointmentSlotChanged - where I can re-schedule appointments, but how can i know if it is dragged over another appointment?

 

Thanks for any help that you can give,

Manuel

Yana
Telerik team
 answered on 28 Mar 2017
5 answers
200 views

Hi,

I'm using a simple setup with some items (just some strings) in a RadListBox with drag and drop to another RadListBox. The drag and drops works fine, but it seems like the property ListBoxDragDropBehavior.AllowReorder does not always work. As you can see I have set it to "false", and when dragging items in normal speed it prevents the items from being reordered. But if i drag and drop a bit more aggressively I can actually reorder the items within the same RadListBox. I added a custom implementation of the ListBoxDragDropBehavior with an override of CanDrop, but that method is never called when dragging aggressively. 

 

<TabItem Header="DragTest">
  <TabItem.Resources>
    <ResourceDictionary>
      <Style TargetType="telerik:RadListBoxItem"
           BasedOn="{StaticResource {x:Type telerik:RadListBoxItem}}">
        <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
      </Style>
    </ResourceDictionary>
  </TabItem.Resources>
  <telerik:RadListBox AllowDrop="True"
              ItemsSource="{Binding DragItems1}" >
    <telerik:RadListBox.DragVisualProvider>
      <telerik:ScreenshotDragVisualProvider />
    </telerik:RadListBox.DragVisualProvider>
    <telerik:RadListBox.DragDropBehavior>
      <telerik:ListBoxDragDropBehavior AllowReorder="False"/>
    </telerik:RadListBox.DragDropBehavior>
  </telerik:RadListBox>
</TabItem>
Magnus
Top achievements
Rank 1
 answered on 28 Mar 2017
4 answers
233 views
See the image below. Obviouslly i can click the white x at the top right hand corner but it just reappears when i click another telerik control
Milena
Telerik team
 answered on 27 Mar 2017
0 answers
156 views

Hi ,

I have a requirement of Infinite paging,

Where I want both previous and next button to get navigate to last and first page respectively.

Navigating to first page on click of Next page button When user is on last page can be achieved by setting IsTotalItemCountFixed = false

But how to have previous page button navigate to the last page When User is on the First page of the Grid ?

Any assistance would be a great help :)

Jai
Top achievements
Rank 1
 asked on 27 Mar 2017
1 answer
404 views
I have a Telerik grid, and have following columns, that are binding with a data source
The first three columns are bound with the datasource, i want the fourth column Status to display the value contained in the local variable localStatus
<telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn Width="Auto" UniqueName="Id" Header="Id" DataMemberBinding="{Binding Id}"/>
<telerik:GridViewDataColumn Width="Auto" UniqueName="Name" Header="Name" DataMemberBinding="{Binding Name}"/>
<telerik:GridViewDataColumn Width="Auto" UniqueName="State" Header="State" DataMemberBinding="{Binding State}"/>
<telerik:GridViewDataColumn Width="Auto" UniqueName="Status" Header="Status" DataMemberBinding="{Binding localStatus}" "/>
</telerik:RadGridView.Columns>


How do i do that.
Stefan Nenchev
Telerik team
 answered on 27 Mar 2017
2 answers
222 views
Is it possible to prevent selection with the arrow keys? Whenever I press an arrow key the selected date change, but I would prefer if the selection wasn't changed until I confirm with Enter (which makes the popup close). I'm binding to SelectedDate and tried to set the UpdateSourceTrigger to LostFocus, but that didn't work.
Magnus
Top achievements
Rank 1
 answered on 27 Mar 2017
1 answer
147 views

Hi,

I am having a problem with usage of cancel operation of DragInitializeEventArgs e in DragInitializeHandler.

After canceling particular items drag functionality it switches to parent item and marks it as chosen for dragging. 

  private void HandleDragInitialize(object sender, DragInitializeEventArgs e)
        {

if(some condition)

{e.cancel=true;}

}

the item that belongs to mentioned condition will not get dragged but his parent instead.

Any solution? 

Martin Ivanov
Telerik team
 answered on 27 Mar 2017
3 answers
414 views
Hi All

  I am Using Rad Menu. Basically i am created 3 menu items like File View and Users
where as User menu item i have binded submenu from database. how to add click event for that submenus.
how can acheive that .
Thanks
G Dinakaran
Tim
Top achievements
Rank 1
 answered on 26 Mar 2017
2 answers
213 views

Hi,

i have the following LinearAxis defined in my RadCartesianChart:

<telerik:RadCartesianChart.VerticalAxis>
    <telerik:LinearAxis
        LabelOffset="1"
        LineThickness="0"
        LabelFormat="P0"
        Maximum="1"
        Minimum="0"  
        MajorStep="0.1">
    </telerik:LinearAxis>
</telerik:RadCartesianChart.VerticalAxis>

 

I want labels only at values 0.1 (10 %) and 0.9 (90 %). See pictures in attchment (yellow lines are CartesianGridLineAnnotation and the blue one is the ScatterLineSeries).

How can I do this?

Thanks

Thomas

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 24 Mar 2017
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
DataPager
PersistenceFramework
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?