Telerik Forums
UI for WPF Forum
5 answers
242 views
Consider my ConnectionManipulationCompleted event handler:

private void diagram_ConnectionManipulationCompleted(object sender, ManipulationRoutedEventArgs e)
{
    if (e.ManipulationStatus == ManipulationStatus.Attaching)
    {
        var source = e.Connection.Source as MyChartShape;
        ...
    }
}

In some cases e.Connection.Source is null. E.g.
1) From a node's connector, drag a new connection.
2) Detach the connection so you end up with a floating one.
3a) Re-attach the tail of the connection to the node's connector. Source is null, target is valid!
3b) Re-attach the head of the connection to the node's connector. Source is null, target is valid!


In 3a the target is in fact the source. In 3b the target is indeed the target. How can I distinguish these two scenarios?
Obviously, in 3a I want a way to see that the target is the source so that I can successfully update our underlying data where the direction of the connection is critical!
Tina Stancheva
Telerik team
 answered on 15 Apr 2013
13 answers
273 views
Seems like a bug. Now I have to re-assign the GraphSource instance in order to see changes in the view. Adding/removing items has no effect.
Tina Stancheva
Telerik team
 answered on 15 Apr 2013
9 answers
126 views
Hi,

How would you modify this program so that when dragging it shows the contents of the ID or UserName column.  Ideally this might be done when calling RowOrderBehaviorSetIsEnable(Grid1, true).  This would allow the code to handle more than 1 data format.

Thanks
Rich
Richard Harrigan
Top achievements
Rank 1
 answered on 15 Apr 2013
1 answer
300 views
Hello, 
I'm running into a problem involving focus not being lost on an editable RadComboBox (in a property grid) when I click on a RadRibbonButton (in a RadRibbonGroup).  If I type some text into the combo box text area, it is not stored to the dependency property that it is bound to until the control loses focus.

<telerik:RadComboBox
   IsMouseWheelEnabled="False"
   ItemContainerStyle="{StaticResource ComboBoxItemStyle}"
   IsEditable="True"
   Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=LostFocus}">
   <telerik:RadComboBox.ItemsSource>
      <Binding Converter="{StaticResource AssetToListConverter}">
         <Binding.Path>Value</Binding.Path>
      </Binding>
   </telerik:RadComboBox.ItemsSource>
</telerik:RadComboBox>

This is required because the Value property is coerced to a valid string before being accepted, and without UpdateSourceTrigger=LostFocus the text box fails to take on the coerced value, something broken in the binding there.

public Object Value
{
   get
   {
      return _property.GetValue(_asset, null);   //using reflection
   }
   set
   {
      //SetValue ends up calling a coerce function which leaves the property untouched if value is invalid
      _property.SetValue(_asset, value, null);
      RaisePropertyChanged(() => Value);
   }
}

If UpdateSourceTrigger was set to PropertyChanged, this setter would be called every time the user types any characters.  If they type an invalid character the coerce function leaves the property unchanged but the text box displays the incorrect string, even though Value is different.

If the user starts typing something into the combo box and then clicks the button (which does a save or export), the Value is not set because the combo box does not lose focus.

<telerik:RadRibbonGroup x:Name="root" Header="Destructible" DialogLauncherVisibility="Collapsed">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <telerik:RadRibbonButton Grid.Row="0"
                                     Grid.Column="0"
                                     Text="New"
                                     IsAutoSize="True"
                                     Command="{Binding NewCommand}" />
        <telerik:RadRibbonButton Grid.Row="1"
                                     Grid.Column="0"
                                     Text="Save"
                                     IsAutoSize="True"
                                     Command="{Binding SaveCommand}" />
        <telerik:RadRibbonButton Grid.Row="2"
                                     Grid.Column="0"
                                     Text="Export"
                                     IsAutoSize="True"
                                     Command="{Binding ExportCommand}" />
    </Grid>
</telerik:RadRibbonGroup>

These two controls are in different assemblies.  I tried clearing focus for the scope in the button command code-behind but at that time Keyboard.FocusedElement is the button.  I can't find any way to force all focus scopes to clear their FocusedElement fields either.  I tried playing with the button's IsTabStop property.  I tried hooking up to a focus changed event on the button (can't find one that gives me the previously focused element, and it probably wouldn't be what I want thanks to focus scopes).  

I might be able to cache off the element every time something changes focus in the property grid and clear its focus scope on button clicks, but this doesn't seem very scaleable.

So I need to fix one of two problems.  Either figure out how to clear focus on the combo box when the button is clicked but before the command is executed, or figure out how to fix the binding issue of the text in the combo box.  Do you have any advice on either fronts?

TIA, Jay
Zarko
Telerik team
 answered on 15 Apr 2013
1 answer
166 views

Requirement:
Set the font, the foreground and background color of the grid (headerrow and and "datarow) at runtime over a context menu. Save it and reload theses on restart.

Actual situation:
- We have implemented a contextmenu for the grid with an attached property. On attaching it "taps" the grid and it is possible to enable and disable single columns over this context menu which opens on right mouse click on header.
- Additional to that, we implemented an additional attached property which also "taps" to the grid OnAttaching, which allows to save the grid settings (columns width, enable columns, filter...) to a file. Add restart the grid takes this settings add set the saved values.
- The grid is styles are in different resource dictionaries which will be added to Application.Current.Resources.MergedDictionaries

Problem:
Now, I would like to add some additional context menu (this works) with color pickers and a font picker (does telerik have a font picker in future for wpf?).
If an new color is selected I created a new style (in code behind) an added it to the resources of the grid. This runs, but now I can't find a solution to save this style like the over values. 

How can I save this lokal style? Is this solution wrong? Do you have an better simpler solution?

Thanks & Regards

 

Dimitrina
Telerik team
 answered on 15 Apr 2013
1 answer
79 views
Hi,

I had installed the free trial of the demos for RadControls and started getting the "Enjoying your RadContolrs for WPF trial?" message when running the installed version of my app but not so when running the app from VS.
I have now installed the purchased version of the WPF IU Controls, after uninstalling the free trial, and I’m still getting the message when running the installed version of my app.
Missing User
 answered on 15 Apr 2013
1 answer
132 views
Run your own samples. They crash too.

Drag a connection from connector A to connector B. Then detach it from B and press Escape to undo the detach operation. This throws an exception. Sigh...

When you fix this, please make sure that the operation is indeed undoable in that sense a new Attaching event is fired.
Pavel R. Pavlov
Telerik team
 answered on 15 Apr 2013
3 answers
144 views
Running latest build (RadControls_for_WPF_2013_1_0401_DEV_hotfix). See attached images!

When I connect two filters where the target has more connectors than the source, the nodes are erroneously arranged (in the attached image you can see that they are effectively swapped). Why does this occur? Please help!

Edit: Also, note the exception (green node). There, the target has indeed more connectors, but the source has none from above.
Petar Mladenov
Telerik team
 answered on 15 Apr 2013
1 answer
149 views
I manage to place my diagram on the edge of the view when zooming in and out a couple of times, moving the mouse at the same time (obviously changing the center point). I want my diagram nodes to never touch the edge of the view. How can I achieve this?

Please note that setting the diagram's Margin does not help.
Hristo
Telerik team
 answered on 15 Apr 2013
2 answers
249 views
Hi,
    I am creating application in that we have multiple series representing different data source just like line,bar,etc.Now what i want to accomplish is that i want to change the data template of bar series so that each rectangle will have of different color.I found this in Online documentation but it is accomplished in XAML. I did not find any resource of changing the template using C# code.Could you please help me to accomplish this?
Thanks in advance.
Dts
Top achievements
Rank 1
 answered on 15 Apr 2013
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?