Telerik Forums
UI for WPF Forum
1 answer
376 views
Seemingly simple question... I have a RadComboBox that I want to display the selected item without the font being bold.

The template being used:

<UserControl.Resources>
  <DataTemplate x:Key="SelectionBoxTemplate">
    <TextBlock Text="{Binding Code}" FontWeight="Regular"/>
  </DataTemplate>
</UserControl.Resources>

The radcombobox:

<telerik:RadComboBox x:Name="RegionComboBox"
                     Grid.Column="2"
                     Margin="2"
                     ClearSelectionButtonContent="Clear"
                     ClearSelectionButtonVisibility="Visible"
                     DisplayMemberPath="Code"
                     ItemsSource="{Binding Regions}"
                     SelectedValue="{Binding Region,
                                             Mode=TwoWay}"
                     SelectedValuePath="Code"
                     SelectionBoxTemplate="{StaticResource SelectionBoxTemplate}"/>

I can change the color of the displayed item, but I cannot get the font weight to be regular. It is always bold.

Thanks.
Masha
Telerik team
 answered on 10 Dec 2014
1 answer
74 views
I have a real-time data stream being visualized with a ChartDataSource in a LineSeries. Right now the previously aggregated values are being rendered properly, but the value for the "current" aggregation (the one that's being built in real-time) moves around until that aggregation interval ends. Is there any way to get the ChartDataSource to only show values from complete aggregations?
Pavel R. Pavlov
Telerik team
 answered on 10 Dec 2014
1 answer
135 views
Hello,
I need to change in SettingsPane, remove Home Tab and Text, and change the content of Style Tab.
How can I do this?
I saw to projects called CustomSettingsPane, but they are not that clear for me.

Can you help me and give me a simple project to follow?

Thank you.
Pavel R. Pavlov
Telerik team
 answered on 10 Dec 2014
3 answers
232 views
Hi,

Q3 2014 WPF RadGridView is support Cell Merge (MergedCellsDirection, GroupRenderMode='Flat')

I want to more improvements.

more detail to see attach file.
(The left column is give an impact on the next column... )

Is it possible?

or  RadControl will spport it(wanted.jpg)  in the near future version .

​
Dimitrina
Telerik team
 answered on 10 Dec 2014
3 answers
190 views
I have a TimeBar in sync with the zoom/pan of multiple ChartViews. I have code that successfully converts between the time ranges of the TimeBar and the Pan/Zoom properties of the ChartViews, and all works well until I try to sync between a TimeBar and multiple ChartViews.

The execution logic goes like this:

Change the TimeBar
TimeBar change event is fired, ChartViews are updated.
ChartView pan/zoom change events are fired. TimeBar is updated, other ChartViews are updated.
TimeBar and ChartView change events are fired. TimeBar is updated, other ChartViews are updated...
etc.

... and so the application hangs from infinite event recursion. The common approach to prevent this is using a bool as a flag to prevent further execution, but this doesn't work. It seems like the assignment of the pan/zoom properties of ChartView objects are delegated through i.e. Dispatcher.BeginInvoke, since the sub-events aren't fired in-between the times where the recursion flag is set.

My current idea is to set the flag to true and set a timer i.e. 100ms later to reset the flag to false, but I'd like to know if there's a less hacky way to do this?
Petar Marchev
Telerik team
 answered on 10 Dec 2014
1 answer
122 views
I was wondering if anyone has ever created a custom router that acts much like schematic capture programs where the connections are all at right angles.  If you look at the youtube video (link is below) starting at 4m28s you can see how this works.  How would I go about creating an orthogonal routing service like this?  What I have done so far is below, which creates two points in the middle of the connection to allow this to sort of work, but it does not handle anything complex such as going around different shapes and adding additional points when needed.  Any thoughts?

public class OrthogonalRouter : IRouter
    {
        public System.Collections.Generic.IList<Point> GetRoutePoints(IConnection connection, bool showLastLine)
        {
            List<Point> pointList = new List<Point>();
            Point start = connection.StartPoint;
            Point end = connection.EndPoint;
 
            pointList.Add(new Point(start.X + (end.X - start.X) / 2, start.Y));
            pointList.Add(new Point(start.X + (end.X - start.X) / 2, end.Y));
 
            return pointList;
        }
    }


http://youtu.be/JutQuq1vFYY?t=4m28s
Kevin
Top achievements
Rank 1
 answered on 10 Dec 2014
2 answers
192 views
Hello,

I am using a TimeLine control in which I have several groups.
I'd like to know if there is a way to get the TimelineItemGroupControl over which I am moving the mouse.
In my scenario I am selecting a row from a GridView and drag-and-drop over the TimeLine control, and depending on the group that I drop the row I need to perform some action.

The TimeLine control has the next style:

<Style TargetType="telerik:TimelineItemGroupControl">
      <Setter Property="IsExpanded" Value="True" />
      <Setter Property="Header" Value="{x:Null}"/>
</Style>


Thanks in advance,

Alberto
Amige
Top achievements
Rank 1
Veteran
 answered on 10 Dec 2014
1 answer
148 views
Hi all,
I would like to use the RadTileView to present a collection of TileViewItems in a grid layout.
Rather than specifying the widths and heights of the items, I'd like to be able to assign them to a row and column as is done with the standard Grid control.
I know this can be accomplished by replacing the RadTileView.ItemsPanel template however doing so completely breaks all of the drag and drop functionality.
I would create a sub-class of the RadTileView control however all of the drag and drop functionality is private.
Any suggestions on how to do this while preserving the drag and drop functionality would be greatly appreciated.

Thanks.
Pavel R. Pavlov
Telerik team
 answered on 09 Dec 2014
3 answers
214 views
Hi,

I used some code from the Demo, the radpanel with shapes.
When i drag and drop a shape on the diagram and call save, the last added shape is not saved, although it is present in the Items collection of the diagram.
What is the fix for this?
What is missing?

Best Regards
Zarko
Telerik team
 answered on 09 Dec 2014
3 answers
195 views
Hi.

I have a drag drop setup between a RadListBoxA (type A objects) and  a ScheduleView(Appointments)

I use OnDragInitialize on the ListBox like this:
private void OnDragInitialize(object sender, DragInitializeEventArgs args)
        {
            var leg = ((sender as ContentControl).Content as TransportOrderLegViewModel);
 
            
            // Convert Data to ScheduleView Payload
            var appt = new Appointment() {  };
            if (leg.Planned)
            {
                appt.Location = "Test";
            }
 
            var payload = new ScheduleViewDragDropPayload(null, new List<IOccurrence>() { appt });
 
            args.Data = payload;
 
 
            // Create DragVisual
            var cc = new ContentControl();
            cc.ContentTemplate = Resources.MergedDictionaries[2]["TOLDragVisualTemplate"] as DataTemplate;
            cc.Content = leg;
            args.DragVisual = cc;
            args.AllowedEffects = DragDropEffects.All;
 
            args.DragVisualOffset = args.RelativeStartPoint;
            args.Handled = true;
        }
In the schedule view I use ScheduleViewLevel1DragDropBehavior : ScheduleViewDragDropBehavior.
In the public override bool CanDrop(DragDropState state) the state.DraggedAppointments shows the appointments , so it all works. 

I will point out here that DragDropState is in fact for this converter an Telerik.Windows.Controls.DragDropState.

THE PROBLEM

Now I have to enable that the objects from RadListBoxA( Type A ) can also be dropped in another RadListBoxB (type B)

RadListBoxB already has dragging enabled from other sources , so it uses a SchematicViewListBoxDragDropBehavior : ListBoxDragDropBehavior
What I noticed is that in the override of CanDrop(DragDropState state) , DragDropState type comes from another namespace: Telerik.Windows.DragDrop.Behaviors.DragDropState

Whenever I drag something from RadListBoxA to RadListBoxB the state.DraggedItems has no elements. 

I thought of using the payload.SetData on the ScheduleViewDragDropPayload to attach extra data , but it doesn't implement that , as it seems it's a different kind of payload than the ones used in other documentation , for example this:
var payload = DragDropPayloadManager.GeneratePayload(null);
var data = ((FrameworkElement)args.OriginalSource).DataContext;
payload.SetData("DragData", data);
args.Data = payload;


Any suggestions would be much welcome. I'm hoping there is a way of doing it without having to rewrite the whole DragAndDrop between all the other controls that are already working nicely.

Thank you
Andrei
Top achievements
Rank 1
Iron
 answered on 09 Dec 2014
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?