Telerik Forums
UI for WPF Forum
2 answers
84 views
Hi All,
Can you please see this video: https://www.youtube.com/watch?v=znp18AcUTOA
You will see that I add a new item and when click to add a second item on focus is last column. How I can make the focus to be on first column every time when user try to add new item? When click on "Click here to add new item" message and with shortcut. Every time when new item row is open the focus to be on first column.

Best regards,
Saykor
Saykor
Top achievements
Rank 2
 answered on 04 Sep 2014
1 answer
235 views
Hi !

I have a RadGridView with attached OnDragInitialize event handler.
When I try to scroll the gridview's scrollviewer then the event is triggered.
How may I disable this?

I've tried this solution:
public void Rad_OnDragInitialize(object sender, Telerik.Windows.DragDrop.DragInitializeEventArgs e)
        {
            RadGridView itemsControl = (RadGridView)sender;
            ScrollViewer scroll = UIHelpers.GetScrollViewer(itemsControl) as ScrollViewer;
            GridViewVirtualizingPanel presenter = UIHelpers.GetItemsPresenter(itemsControl);
             
            if (presenter != null && scroll != null && scroll.IsMouseOver && !presenter.IsMouseOver)
            {
                return;
            }
.............

The event isn't triggered anymore but the scrollviewer won't move at all.

thanks,
Idan
Nick
Telerik team
 answered on 04 Sep 2014
5 answers
330 views
Hi all,

I have seen very few examples of the diagram control in the WPF Control demo that gets installed.  I think there are only 2 and 1 is just a theming demo.  Given the potential for this tool I think that is a shame; anyway...

I need to build an application that allows users to search for objects from a database.  They can then drag objects from the search results onto a diagram control where all the immediate relationships coming from those are drawn and laid out.  There is, as always, a slight twist in the fact these objects are effectively entities and any one entity can have more than one role (just names really) but the important things is an entity can have one or more relationships and a role can have one or more relationships.

I therefore need to diagram an objects relationships to other objects, baring in mind that if the object is an entity it can also have roles which have relationships and vice versa.

I'd appreciate it if someone could take the time to help get me started with a sample application that basically provides the above functionality which I can then grow on.  If anyone has experience developing something similar then I'd also be interested in any advice and lessons learnt...


Thanks,
Drammy
Pavel R. Pavlov
Telerik team
 answered on 04 Sep 2014
8 answers
2.4K+ views
Hi,

I have a requirement to display the row number (index of the binded ObservableCollection) similar to how Excel displays rows.  How can I accomplish this behavior?  I looked into different ways, but I didn't have much success.

Thanks in advance,

Wagner
Saykor
Top achievements
Rank 2
 answered on 03 Sep 2014
6 answers
361 views
Hi Team,

I am doing auto generate properties to false and providing my own property definitions.
The issue is the text box in my data template are not properly align some are of small size some are big based on the text.
I want it to be properly aligned like " stretch" when I resize the grid they should get resized properly and all will be of equal length.
 Also I want the splitter in the grid should uniformly separate the propert name from its value.

could le you help me achieve this
Yoan
Telerik team
 answered on 03 Sep 2014
3 answers
521 views
Hello, sorry if this is posted in the wrong section of the forum.

Now, my question is simple.
I want to find and replace text(strings) in a document, I've tried using the following code:

private void ReplaceAllMatches(RadDocument document, string toSearch, string toReplaceWith)
{
       DocumentTextSearch search = new DocumentTextSearch(document);
       List<TextRange> rangesTrackingDocumentChanges = new List<TextRange>();
       foreach (var textRange in search.FindAll(toSearch))
       {
                TextRange newRange = new TextRange(new DocumentPosition(textRange.StartPosition, true),
                new documentPosition(textRange.EndPosition, true));
                rangesTrackingDocumentChanges.Add(newRange);
            }
 
            RadDocumentEditor docEdit = new RadDocumentEditor(document);
            foreach (var textRange in rangesTrackingDocumentChanges)
            {
                document.CaretPosition.MoveToPosition(textRange.StartPosition);               
                document.DeleteRange(textRange.StartPosition, textRange.EndPosition);
                 
                StyleDefinition style = new StyleDefinition();
                style.SetPropertyValue(Span.ForeColorProperty, Colors.Red);
                                               
                document.Insert(toReplaceWith, style);
 
                textRange.StartPosition.Dispose();
                textRange.EndPosition.Dispose();
            }
        }

But I get two errors, "document.DeleteRange() is obsolete use RadDocumentEditor.Delete() instead." and "document.Insert() is obsolete use RadDocumentEditor.InsertInline() instead.".
I can't figure out how to use these functions instead so that's why I need help!

I've never used this library before so all help is very appreciated.
Best regards
Isak
Petya
Telerik team
 answered on 03 Sep 2014
7 answers
976 views
Hello,

i tried to get the text in RichTextBox with Binding with a property of my ViewModel with type 'string'.
But
something with binding is always wrong. I couldn't pass a defined
string from ViewModel, and i got always string.empty from RichTextBox.

Here is my code in xaml, i also tried RadWatermarkTextBox, that works fine.
<telerik:XamlDataProvider RichTextBox="{Binding ElementName=richTextBox1}" Xaml="{Binding PropertyName, Mode=TwoWay}" />
<telerik:RadRichTextBox Name="radRichTextBox"/>
 
<telerik:RadWatermarkTextBox Text="{Binding Path=PropertyName, Mode=TwoWay}"/>

I have seen some articals with using selection. But i don't want to use it instead of lovely binding...
Another try i have done is with TextRange
var startPosition = new DocumentPosition(radRichTextBox.Document.CaretPosition);
var endPosition = new DocumentPosition(radRichTextBox.Document.CaretPosition);
startPosition.MoveToFirstPositionInDocument();
endPosition.MoveToLastPositionInDocument();
 
var text = new TextRange(
           // TextPointer to the start of content in the RichTextBox.
           startPosition,
           // TextPointer to the end of content in the RichTextBox.
           endPosition).Text;
But Telerik TextRange has difference of MS TextRange, it has no property Text...

Is there a easy way to implement that? That could not be so hard, right? Or what i did wrong in my code?
Petya
Telerik team
 answered on 03 Sep 2014
3 answers
214 views
Is it possible to get hold of the Office2013Palette.Palette.AccentMainColor in XAML?

I know you can get hold of the brushes, using something such as
      telerik:Office2013Resource ResourceKey=EffectAccentHighBrush

however, I need to assign to a color property in the XAML. For the Windows 8 theme, I would use something along the lines of 
      Color="{Binding Source={StaticResource Windows8Colors}, Path=Palette.MainColor}"

Is there a way to get the similar value for the Office2013 theme? 

Thanks
Jason
Vanya Pavlova
Telerik team
 answered on 03 Sep 2014
3 answers
388 views
Hello,

I want to implement drag n drop functionality from RadGridView to RadTreeView. I dont want to use ViewModel.

in the RadGridView i have some data pulled from Database , i.e a list of songs with their tags as columns.

In the treeview i have made some categories of songs. I want to drag a song / or multiple songs from RadGridView and drop it on a category node of treeview. internally i will get a list of all selected rows of grid which or dragged on the Drop Event of treeview and update it to my collection and later in DB. I looked in your demos but all are using MVVM. I want a pure C# code , which would implement my task ASAP.
Yana
Telerik team
 answered on 03 Sep 2014
3 answers
231 views
Hi,

I've app with default theme and I would like to know if it is possible to use Windows8Theme scrollview for my gridview. And I also  need to perform some customization for example I need to change thumb color, remove up/down repeatbuttons.  Thanks in advance for any help.
Vanya Pavlova
Telerik team
 answered on 03 Sep 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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?