Telerik Forums
UI for WPF Forum
5 answers
496 views
I am creating a ToolTipTemplate in code based on this previous thread:
http://www.telerik.com/forums/programmtically-changing-mapshapereader-tooltip-when-using-a-custom-template

That works. However, the underlying MapShapeData represents information from an unknown number of values. Example:

Value 1

or maybe:

Value 1
Value 2
Value 3

etc.

Is it possible to bind an ItemsControl to list all these values without knowing in advance how many there are?
Jason D
Top achievements
Rank 1
Veteran
 answered on 19 Aug 2014
2 answers
158 views
I'm looking for a way to define a mouse enter event for the expand button on a hierarchy gridview. I have nested grids and a drag and drop functionality. I want to be able to start dragging and then mouse over the + and expand another row to drop into the child gridview. Is this a possibility?
Yoan
Telerik team
 answered on 19 Aug 2014
1 answer
613 views
I undestend that you some how with internal buisness logic set TextSearch.TextPath if developer set DisplayMemberPath value with ItemTemplate.
How you do it that with runtime code example?

I inherited your RadCombobox class

class EditComboBox : RadCombobox {
}

<Grid>
<controls:EditComboBox x:Name="ecbControl" telerik:TextSearch.TextPath="Description" />
</Grid>


How to dinamicly set
MyEditComboBox.TextSearch.TextPath="Description" ?

Here is my property

private static readonly DependencyProperty CurrentDisplayMemberPathProperty = DependencyProperty.RegisterAttached("CurrentDisplayMemberPath", typeof(string), typeof(EditComboBoxUserControl), new FrameworkPropertyMetadata(OnCurrentDisplayMemberPath));
       private static void OnCurrentDisplayMemberPath(DependencyObject d, DependencyPropertyChangedEventArgs e)
       {
           var view = (d as EditComboBoxUserControl);
           if (view == null)
               return;
           string value = (string)e.NewValue;
           view.CurrentDisplayMemberPath = value;           
       }
       [DefaultValue("")]
       [Localizability(LocalizationCategory.Text)]
       [Bindable(true)]
       public string CurrentDisplayMemberPath
       {
           get
           {
               return (string)GetValue(CurrentDisplayMemberPathProperty);
           }
           set
           {
               SetValue(CurrentDisplayMemberPathProperty, value);
               // Telerik.Windows.Controls.TextSearch.SetTextPath(this.ecbControl, value);
               //this.ecbControl.DisplayMemberPath = value;
           }
       }

Place your code is settary of dependancy property.
kity
Top achievements
Rank 2
 answered on 19 Aug 2014
1 answer
169 views
Hi

Is it possible to enable cell selection for the RadPivotGrid so that you are able to select a block of cells and then copy and paste these to Excel ?

Regards
Ryan
Kalin
Telerik team
 answered on 19 Aug 2014
11 answers
452 views
Hello,

I am using the RadRichTextBox in a custom reporting solution in my application.  I have a situation where the user has entered comments in rtf format in our application and I need to show these in a report.  However, the comments may exceed the space on one page, so I need to detect the portion of the document that is visible within the bounds of the control and then split the document up over two or more pages, each with its own RadRichTextBox control.

When I check the CaretPosition at the end of the document the Y value on the Location property is less than the height of my control, but the text exceeds the bounds of the control when viewed.

Here is the code I am using:

DocumentPosition caretPos = null;
DocumentPosition endOfDocument = null;
 
var rtfText = myRtfText;
if (rtfText != null)
{
    var provider = new RtfFormatProvider();
    var radDocument = provider.Import(rtfText);
    radDocument.SectionDefaultPageSize = new Size(maximumSize.Width, maximumSize.Height);
    var radRichTextBox = new RadRichTextBox{Document = radDocument};
 
    DocumentPosition tempPos = radRichTextBox.Document.CaretPosition;
    tempPos.MoveToLastPositionInDocument();
    endOfDocument = new DocumentPosition(tempPos);
 
    caretPos = radRichTextBox.Document.CaretPosition;
    caretPos.MoveToFirstPositionInDocument();
 
    if(caretPos != endOfDocument)
    {
        var start = new DocumentPosition(radRichTextBox.Document.CaretPosition);
        while (caretPos.Location.Y - start.Location.Y < maximumSize.Height)
        {
            if (!radRichTextBox.Document.CaretPosition.MoveToCurrentLineEnd())
                break;
            if (!radRichTextBox.Document.CaretPosition.MoveNext())
                break;
        }
        if (caretPos.Location.Y - start.Location.Y > maximumSize.Height)
        {
            // Back up so the content fits within the range
            radRichTextBox.Document.CaretPosition.MoveToLastPositionInPreviousParagraph();
        }
 
        var docSelection = new DocumentSelection(radRichTextBox.Document);
        docSelection.SetSelectionStart(start);
        docSelection.AddSelectionEnd(caretPos);
 
        var docFragment = new DocumentFragment(docSelection);
        var newDoc = new RadDocument();
        var editor = new RadDocumentEditor(newDoc);
        editor.InsertFragment(docFragment);
        var rtfSegment = provider.Export(newDoc);
     }
  }

Also, attached is an image of the report with the control on it, clearly showing that there is text beyond the bottom of the control.

Any insight you could offer would be appreciated.

Thanks,

Peter
Kammen
Telerik team
 answered on 19 Aug 2014
3 answers
275 views
I have an AggregateDescriptions like this

<DataProviders:LocalDataSourceProvider.AggregateDescriptions>
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Count" AggregateFunction="Count" />
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Sum" AggregateFunction="Sum" />
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Max" AggregateFunction="Max" />
     <Core:PropertyAggregateDescription PropertyName="Prize" CustomName="Min" AggregateFunction="Min" />
</DataProviders:LocalDataSourceProvider.AggregateDescriptions>

When using them in the RadPivotFieldList in the 'Value' -cell, they all show up as "Prize".
Is it possible to set a DisplayName or something like that?

And what about formatting money? Is it possible to set the decimals?


Kalin
Telerik team
 answered on 19 Aug 2014
12 answers
158 views
How do I set the Zoom Range of a PolylineData that it being used on the VisualizationLayer?

Andrew
Andrey
Telerik team
 answered on 19 Aug 2014
6 answers
749 views
Hello,

I need to remove GridView's header row border partially to display only right and bottom sides(Grid.png). I've tried to style HeaderRow and HeaderCell but it does not help so the whole border is seen.  Any idea how can I achieve that?  Here is my styles

<Style x:Key="gridheaderstyle"  TargetType="telerik:GridViewHeaderRow">
        <Setter Property="BorderBrush"      Value="Transparent" />
        <Setter Property="BorderThickness"  Value="0 0 0 0" />
        <Setter Property="Background"       Value="Transparent" />
</Style>
 
<Style x:Key="gridheadercellstyle"  TargetType="telerik:GridViewHeaderCell">
        <Setter Property="Background"       Value="Transparent" />
        <Setter Property="BorderBrush"      Value="Black" />
        <Setter Property="BorderThickness"  Value="0 0 1 1" />
</Style>
Tigran
Top achievements
Rank 1
 answered on 19 Aug 2014
5 answers
185 views
How  can I add an custom annotation in the Header and footer ? Is there a way to do it ?

Document.CaretPosition doesnt get the Header position. I dont find any move functions to move in to the Header as well ?.

I added custom annotation on the document as below :

Document.InsertCustomAnnotationRange(position, position, new RangeStart(id),  new RangeEnd());

Didn't find any functions to add custom annotations in the Header or move in to the Header  ? Could you help me in this please ?

Thanks
Anand

Anand
Top achievements
Rank 1
 answered on 19 Aug 2014
1 answer
271 views
Hi,

We are considering whether to buy the WPF Telerik controls. However we have some difficulties to customize the data filter operators for DataFilter control.
For example, if i would like to only display IsEqualTo or NotEqualTo as operator selection only, what should i do? 

Also, we have custom data type that might need to use a custom filter operator list. Can we pass in our own set of operator to the control? For example, some property like OperatorSource = {Binding OperatorList}?

Hope to hear from you soon.

Thank you.
Dimitrina
Telerik team
 answered on 19 Aug 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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?