Telerik Forums
UI for WPF Forum
4 answers
225 views
I'd appreciate any assistance on this as I feel I have been circling the solution for days.

Here is the scenario:

I have multiple rows of ellipses on a diagram for which the position is persisted to a backing property in my view model.

Using the PenTool, I draw a complex shape on the diagram, whose path is persisted to a backing property in my view model, it is closed and filled using Nonzero.

Upon execution of a command, I collect the selected Ellipses and evaluate whether the Path (which is a PathGeometry from the PenTool) FillContains the positions of the Ellipses.

What I have noticed:

1. The resulting PathGeometry from the PenTool contains a single figure whose StartPoint is often not the position of the of the diagram shape (the CreateShapeGeometry performs some manipulation/normalization within the DrawingService for this.)

2. Regardless of whether I use FillContains or FillContains with detail, the results of examining the ellipse shape points is inconsistent with the visual that is
rendered within the diagram.

Example attached.
Robert
Top achievements
Rank 1
 answered on 24 Feb 2014
3 answers
390 views
Hi!

I'm using a PropertyGrid which, for some string properties, requires a custom control a made, LinkTextBox.
I created a datatemplate,
            <DataTemplate x:Key="linkTextBoxDataTemplate">
                <Wpf:LinkTextBox TextMaxLength="4000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                 telerik:AutoBindBehavior.UpdateBindingOnElementLoaded="Text"/>
            </DataTemplate>
where Text is the name of the control's property the property grid property is bounded to. I noticed this is required for binding.

I have 2 problems.
1. I need to access at runtime the LinkTextBox instance, for the current selected property. Using grdPropr.SelectedPropertyDefinition.EditorTemplate I get the above template, but I cannot navigate in the Visual/Logical tree. I can't use the .LoadContent() method, because this gives me e new instance of my control, not the one inside the PropertyGrid
2. When using a custom EditorTemplate, like this one, I noticed that when clicking in the control doesn't actually select the property in the PropertyGrid. When using the default template, clicking in the TextBox (which is the default editor for strings) automatically selects the current property

Thanks,
Alex

Dimitrina
Telerik team
 answered on 24 Feb 2014
1 answer
328 views
I'm autogenerating the fields of my RadDataForm. 

Now I want to set different background colors for the TextBoxes being generated. For example Textbox of property 'Name' should have a green background and Textbox for property 'Age' should have a blue background.

In RadGridViews the autogenerator can set very comfortably GridViewAutoGeneratingColumnEventArgs.Column.CellStyle, but how do I do this in a DataForm?
Yoan
Telerik team
 answered on 24 Feb 2014
1 answer
133 views
Hello
Some abilities like "text box" and "page border" and... are not in Telerik Editor ribbon. How can I use them?
Thank you.
Missing User
 answered on 24 Feb 2014
3 answers
204 views
Hi Team

I have many grids opened  say (3) at a time. I can export individual grid to a different excel using the export functionality. Now I want to export these 3 grids in single file using the telerik functionality.

Is it possible ? As i see in current API , i cannot provide the sheet name , so any alternative to that...

I got this article : http://www.telerik.com/help/winforms/gridview-exporting-data-export-to-excel-via-excelml-format.html , but i dont have reference to the dlls mentioned there.

please suggest a way.
Dimitrina
Telerik team
 answered on 24 Feb 2014
2 answers
118 views
Hi,

I am using an aggregate function to display the sum of the column values in the footer. But in some cases I want to hide the footer text. Is this possible to do in runtime (i.e. set visibility for footer text)?

Thanks!
Petter
Top achievements
Rank 1
 answered on 24 Feb 2014
0 answers
126 views
hi
i have gridview filled with datatble,when data  is loaded ,the user can edit some column,one of this column must have only 3 value(OK,NOK,Waiting Data),for this i use validating event like this:

private void Gridswap_CellValidating(object sender, GridViewCellValidatingEventArgs e)
       {
           if (e.Cell.Column.UniqueName == "KPI Status( OK &NOK )OPTIM")
           {
               if (e.NewValue.ToString() != "OK" && e.NewValue.ToString() != "NOK" && e.NewValue.ToString() != "Waiting KPI")
               {
                   e.IsValid = false;
                   MessageBox.Show("The value must be OK,NOK or Waiting Data");
              
}               
           }
       }
for more flexibility, i want to use the same thing but with combobox,i saw all tu tutorial and documentation for using combobox with gridvieuw but doesn't work for me,some one can help me plz
thx in advance
Amine
Top achievements
Rank 1
 asked on 23 Feb 2014
1 answer
102 views
I'm doing some clipping of bars in a bar chart & am using a class derived from ChartSmartLabelsStrategyBase to place the labels in some custom locations. However, I need to also use label connectors. Those connectors are drawn when I add a ChartSeriesLabelConnectorsSettings to the BarSeries, but I need the connector to end at a different location. Right now it ends at what looks like the edge of the layout slot for the point. I need to move the endpoint to a point inside that layout slot so it makes sense with my label's final layout slot.  Is there a way to move that endpoint/change the connector geometry, etc.?

Thanks - Mitch

Boris
Telerik team
 answered on 21 Feb 2014
26 answers
824 views
When NOT autogenerating columns, it makes sense why the DataContext for a CellTemplate would be the entire row/object.  In this case when AutoGenerateColumns=False, the XAML developer is required to manually set up the data bindings; the column/property names are known to the developer.  This feature allows for multiple cell values to be combined into a single grid cell for some interesting features.

However, it makes templating cells very difficult when AutoGeneratingColumns=True because often the reason why the columns are generated automatically is that the specific names of the columns are not known ahead of time; the columns may be dynamic.  And, it's extremely difficult to get the value of the grid cell when automatically generating columns.  The bindings could be reset for every cell, but I've seen where this is not recommended, and I completely agree.

One technique I've seen is to have the DataContext of an element within the DataTemplate to scan the VisualTree hierarchy for the GridViewCell:

DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type gridView:GridViewCell}}"

This works unless you attempt to use this DataContext for a property, like a ToolTip, that doesn't live in the same VisualTree.  Attempting to bind to the parent DataContext will yield a "Cannot find element that provides DataContext." binding error during runtime.

Of course, instead of a DataRow, each row could be a collection of MVVM objects instead of a DataTable, and I could put metadata in the objects to be used to style the cells.  Unfortunately, this seems extremely inefficient and clunky.

A CellTemplateSelector with a well-crafted attached property seems to be the right way to go.  The SelectTemplate item parameter has the GridViewColumn but the value within the DataTemplate is still a DataRow.

I could convert each grid cell value with an IValueConverter into an object that pairs the cell data value with some metadata that could be used for selecting a template, but the specific column is not sent into the Convert method, so I wouldn't know what to convert it to.

I've seen many versions of this problem on your forum, but there are either no answers, or their touched on so vaguely that there not useful.  Do you know of a comprehensive and elegant solution to this common problem?


Dimitrina
Telerik team
 answered on 21 Feb 2014
5 answers
137 views
I have some content that will contain a browser window.  The browser window I am using does not work well with WPF transitions, etc. (i.e. air space issues).  So I need to Hide/Collapse the Browser portion of the content while any animations on its containing control are occurring. And I then would make the Browser window visible when the transition is complete.  Usually the content in a RADTransitionControl should not care, but there are times like above when it does.  Its ugly, but it is much better looking than the alternative.

Before obtaining the Telerik controls I had used the Transition Control from the WPF Toolkit.  I modified it to check and see if the content it was transitioning implemented an interface I created called ITransitioningAware.  If it did, it would call starting and completed methods on that interface to let the content know what is going on.  Has Telerik implemented anything similar to let the content be aware of the transitioning process?  If not, can it get onto the wish list?  I know its a special case, but that's what a lot of these kinds of features end up being for.

I could potentially implement the functionality in the parent of the TransitionControl by handling the Events it generates but I need to be aware of previous and next content to do it.  Are those available at the time of the events?

Thanks
Paul
Vladi
Telerik team
 answered on 21 Feb 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
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?