Telerik Forums
UI for WPF Forum
3 answers
180 views
I'm trying to dislpay a text informing the user that more items are loaded on the background of the tree view. I am trying to change the template. As soon as the ItemsPresenter is not a direct child of ScrollViewer the tree stops displaying the items.

Here is my template:

    <ControlTemplate x:Key="RadTreeViewWithLoadingTemplate" TargetType="{x:Type telerik:RadTreeView}">
        <Grid x:Name="RootElement">         
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                <Grid>
                    <ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Background="{x:Null}" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" IsTabStop="False"
                                  Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Auto"
                                  Style="{DynamicResource LoadingScrollViewerStyle}">
                        <Grid>
                            <Grid.RowDefinitions>
                              <RowDefinition Height="Auto" />
                              <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <ItemsPresenter/>
                            <TextBlock Text="Loading more items!" Height="20" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>                       
                    </ScrollViewer>
                    </Grid>
            </Border>
        </Grid>
    </ControlTemplate>

Thanks,
Justyna
Tina Stancheva
Telerik team
 answered on 04 Oct 2012
1 answer
102 views
Hi

With release .Net version 4.0 of wpf diagram, we have overrided the OnPositionChanged to prevent the user to move the chart to the left and upward compared to the position (0,0).   If the coordinates of the diagram exceed the point of origin, the position is reset to the origin point.  Ex.: (10, -10) is converted into (0, -10).
 
We have updated our solution with the beta 4.5 and the behavior has changed. It is impossible to change the Position property of the diagram in the method "OnPositionChanged."

I attache a sample project. The source code is in the class "MyDiagram." Download project here

Could you
restore the original behavior or offer a solution?

Sincerely,

    protected override void OnPositionChanged(Point oldPosition, Point newPosition)
    {
        base.OnPositionChanged(oldPosition, newPosition);
        Point newPoint = newPosition;
 
        if (newPosition.X > 0)
        {
            newPoint.X = 0;
        }
        if (newPosition.Y > 0)
        {
            newPoint.Y = 0;
        }
        //With the 4.0 DLL version, there is no problem to set the new position
        if (newPoint != newPosition)
        {
            this.Position = newPoint;
        }
 
        if (newPoint != newPosition)
        {
            //With the 4.5 DLL version, I need to invoke the method to get the same behaviour
            //but the diagram flikers
            Dispatcher.BeginInvoke(new Action(() =>
                                                  {
                                                      this.Position = newPoint;
                                                  }), DispatcherPriority.Render);
        }
 
        sh.SetText(((int)this.Position.X).ToString("") + "  -  " + ((int)this.Position.Y).ToString(""));
    }
}
Hristo
Telerik team
 answered on 04 Oct 2012
3 answers
213 views

It is not clear to me how one would go about virtualizing vertically.

For example, if one has many possible "groups" in a scroll viewer which are controlled by a single slider they would not want to materialize all of the UI elements.  Subsequently if the query could be broken up by group, they would not want to query the records for all of the groups.

Any ideas or examples out there?
Tsvetie
Telerik team
 answered on 04 Oct 2012
1 answer
372 views
Hi,

I simply want to change the default font of my RadRichTextBox from Times New Roman to Calibri. How do I do this?

My RTB uses a HtmlDataProvider which converts html correctly, however I'm wanting Calibri for the instance where just plain text it set.

From this post, I've tried:
<telerikHtml:HtmlDataProvider Html="{Binding WorkCompleted, Mode=TwoWay}"
RichTextBox="{Binding ElementName=radRichTextBox1}" />
<telerik:RadRichTextBox x:Name="radRichTextBox1"
FontFamily="Calibri" FontSize="16" DocumentInheritsDefaultStyleSettings="True" />
This changes the font size but not the fontfamily.

Thanks
Petya
Telerik team
 answered on 04 Oct 2012
4 answers
142 views
Hi, 
     I have found that if you try to copy a word with apostrophe. It removes apostrophe character in wpf control. But its working fine with silver light control. Any idea, any fix of any work around for the issue. Please suggest some thing in this regard thanks.

Regards,
muhammad
Top achievements
Rank 1
 answered on 04 Oct 2012
10 answers
164 views
Hi,

I use your RadGridView (Version 2012.2.0607.40) in my application to display a grid with e.g. two columns named ColumnA and ColumnB.
The data of the grid is sorted by this SortDescriptor:

<telerik:RadGridView.SortDescriptors>
    <telerik:SortDescriptor Member="ColumnA"
                    SortDirection="Descending" />
</telerik:RadGridView.SortDescriptors>

The grid is bound to an ObservableCollection. Now I want to delete a row if the data of ColumnB of a row is changed to a specific value by the user. So I subscribed to the PropertyChanged Event of my row ViewModel and if the data of ColumnB is changed to the value I remove this row from my ObservableCollection. This works without a problem but the grid is not updated correctly. It removes the last row even if this row was not removed from my collection. Only if I manually reorder the list by clicking on the header of ColumnA, I get the correct data displayed.

Do you have any suggestion how to fix this problem?

Best regards,

Christian
Christian
Top achievements
Rank 1
 answered on 04 Oct 2012
2 answers
144 views
Hello,

I have the need to display controls before and/or after the tab items themselves.

Please see the attached screenshot to demonstrate the behavior I'm after.

How can I accomplish this using the Telerik WPF TabControl?

Thanks for any assistance.
Mark
Top achievements
Rank 1
 answered on 03 Oct 2012
0 answers
92 views
 

We have a class called TestData which contains a string called Header and a list of doubles called Data.  We then add several of these TestData objects to an ObservableCollection<TestData> called UberData. As new data becomes available at run time, we either add items to the Data list of an existing TestData object in the UberData collection , or we add an entirely new TestData object to the collection.  For example we might have an ObservableCollection<TestData> that contains TestData.Header = “Channel1” and TestData.Header=”Channel2”, etc.

 

 

We would like to databind the first column of the grid to the Data list for channel 1, inside the UberData collection, and the second column of the grid to the Data list object for channel 2 etc. In the binding we would like to bind the grids column 1 header to TestData.Header and the data for the grid column to TestData.Data.

 

Is this possible? We have failed to do this with the Microsoft WPF Grid. The general problem has been that we don't know how many collections will be inside the Uber collection as it is dynamic i.e. we don't know how many at design time.

 

The MS Grid control has this behaviour: A data row is created for each object in the collection, and a column is created for each property. The values of the cells in each data row correspond to the property value of each object.

 

Our data is column centric. We need a column for each object in the collection.

 

John
Top achievements
Rank 1
 asked on 03 Oct 2012
3 answers
234 views

I'm using the tree control from C#.  Our application can fill the tree with a lot of data. Every time a user either expands an individual tree node or initiates the expand all nodes call, if any column is set to be sorted, an InvalidOperationException is thrown when Telerik's internal code is calling the "get" method of the "Column" property in the Telerik.Windows.Controls.GridView.ColumnSortDescriptor class.

The the VS debugger flags the exception in the file "c:\RadControlsSource\Controls\GridView\GridView\GridView\Sorting\ColumnSortDescriptor.cs", line 38.

Here's the exception information:

System.InvalidOperationException was unhandled by user code
  Message="The calling thread cannot access this object because a different thread owns it."
  Source="WindowsBase"
  StackTrace:
       at System.Windows.Threading.Dispatcher.VerifyAccess()
       at System.Windows.Threading.DispatcherObject.VerifyAccess()
       at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
       at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.get_Column()
       at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.CreateSortKeyExpression(ParameterExpression parameterExpression)
       at Telerik.Windows.Data.SortDescriptorBase.CreateSortKeyExpression(Expression itemExpression)
       at Telerik.Windows.Data.Expressions.SortDescriptorCollectionExpressionBuilder.Sort()
       at Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, IEnumerable`1 sortDescriptors)
       at Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, SortDescriptorCollection sortDescriptors)
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.get_BaseView()
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.CreateHierachyView(HierarchicalCollectionViewBase view)
       at Telerik.Windows.Data.HierarchyItem.get_Children()
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.<CreateView>b__23(HierarchyItem h)
       at Telerik.Windows.Data.EnumerableExtensions.<SelectRecursive>d__3`1.MoveNext()
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.PopulateInternalList(IQueryable view)
       at Telerik.Windows.Data.HierarchicalCollectionViewBase.<>c__DisplayClass32.<CreateInternalList>b__2e(Object s, DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
  InnerException:

I am accessing the TreeListView control from the main UI thread. When this exception happens, the state of the tree control is hosed and our Windows desktop application must be restarted. Can anyone give me a clue as to how I can avoid this problem?  Thanks.
Don
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
74 views
I am working on an application that has a list of Categories.  Each Category has a list of Tests.  When someone selects a student from the list, I want to be able to load their percentages as they are associated to the lists of Cat\Tests.  The problem is that I can't figure out how to access the cells in the grid that represent the values.  My tree part is loading just fine, but I want to be able to manually enter the scoring percentage from another object.  Is this possible?  I have included a mock up of what I am looking for

Name Correct Incorrect Not Answered
Math
Test 1 4 1 0
Test 2 6 0 0
Spelling
Alphabet Test 20 0 6
Lower Case 18 5 3

As I said before, I have the tree loading through binding, but I need to access the cells for the other numbers directly based on the selected student.

Thanks in advance,
Lee
Lee
Top achievements
Rank 1
 answered on 03 Oct 2012
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?