Telerik Forums
UI for WPF Forum
3 answers
392 views
I need to allow users to select multiple points on a ChartView chart by click-and-dragging the mouse, ideally in an arbitrary closed shape (lasso), but minimally in the rectangle formed by the positions of the mouse-down and mouse-up events. Handling the mouse events to define the area, and performing a hit-test on the points should be easy enough for the rectangular case, but I also need visual feedback on the screen showing the shape being drawn.

Are there any examples available showing the best way to accomplish something this with a ChartView? If not, is there anything besides the mouse events I should be exploring, and what's the best approach for the visual feedback aspect?

Thanks,
Louis
Louis
Top achievements
Rank 1
 answered on 10 Mar 2014
3 answers
629 views
I have a WPF /MVVM application. I need to put  2 buttons, Expand All and Collapse All above the grid. I need an example of binding each row's expanded property to a view model.

Thank you
Yoan
Telerik team
 answered on 10 Mar 2014
1 answer
138 views
To export all the row details elements

 
<telerik:RadGridView.RowDetailsTemplate>
              <DataTemplate x:Name="RowDetailsProvider">
                  <StackPanel>
                      <telerik:RadGridView x:Name="grdNPISItem1" ItemsSource="{Binding NPISItemsCollection}"   GroupRenderMode="Flat">
                          <telerik:RadGridView.Columns>
                              <telerik:GridViewColumn>
                                  <telerik:GridViewColumn.CellTemplate>
                                      <ItemContainerTemplate>
                                          <telerik:RadButton Name="btn1" Content="sdfsd" Click="btn1_Click"></telerik:RadButton>
                                      </ItemContainerTemplate>
                                  </telerik:GridViewColumn.CellTemplate>
                                  <telerik:GridViewColumn.Header>
                                      <telerik:RadButton Name="RdBtn" Content="Click"></telerik:RadButton>
                                  </telerik:GridViewColumn.Header>
                              </telerik:GridViewColumn>
                          </telerik:RadGridView.Columns>
 
                      </telerik:RadGridView>
                      <telerik:RadGridView x:Name="grdNPISCover1" ItemsSource="{Binding NPISCoversCollection}"></telerik:RadGridView>
                      <telerik:RadGridView x:Name="grdNPISNote1" ItemsSource="{Binding NPISNotesCollection}"  ></telerik:RadGridView>
                  </StackPanel>
              </DataTemplate>
          </telerik:RadGridView.RowDetailsTemplate>
Yoan
Telerik team
 answered on 10 Mar 2014
2 answers
244 views
I made a custom settings container for my image editor. I am wondering on the draw text tool, how can I bind the properties there to my custom settings UI? Also wondering if I can change the background of the textblock that is displayed? Is there a custom tool demo that closely resembles the DrawTextTool?

Thank you
Missing User
 answered on 10 Mar 2014
1 answer
170 views
Hey guys,
I've got a problem which is really frustrating. I am trying to display content based on its type in a RadGridView. Therefore I am using a DataTemplate referenced to a DataType. Sadly it seems like the DataType isnt beeing recognized at all. If I change the DataMemberBinding from "{Binding}" to a member of the object which is of type string - it is working but thats not what I need, i need it to be working with my own Data types(classes). 



XAML:
<Window x:Class="RadControlsWpfApp1.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                xmlns:local="clr-namespace:RadControlsWpfApp1"
                xmlns:System="clr-namespace:System;assembly=mscorlib"
                Title="MainWindow" Height="350" Width="525">
        <Grid>
        <telerik:RadGridView x:Name="Grid" Grid.Column="1" Margin="11,10,9,50" Grid.Row="1" ItemsSource="{Binding}" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn IsReadOnly="True" Header="test" DataMemberBinding="{Binding}" >
                    <telerik:GridViewDataColumn.Resources>
                        <DataTemplate DataType="{x:Type local:Foo}">
                            <TextBlock Text="test" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.Resources>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
    </Grid>
</Window>


Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
 
namespace RadControlsWpfApp1
{
    public class Foo
    {       
        public string Name { get; set; }
        public string Value { get; set; }
    }
    public class Foo2
    {
        public string Name { get; set; }
        public string Value { get; set; }
    }
 
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    ///
    public partial class MainWindow : Window
    {
         
        public MainWindow()
        {
            var list = new List<object> { new Foo2() { Name = "Brian2", Value = "val2" }, new Foo() { Name = "Brian", Value = "val1" } };
 
 
            InitializeComponent();
            Grid.DataContext = list;
        }
    }
}
Dimitrina
Telerik team
 answered on 10 Mar 2014
1 answer
272 views
Hi,

Previously I was using RadGridView with RadDataForm.
When IsSynchronizedWithCurrentItem property setted to True value, this controls working synchronous.

I needed Hierarchical items on some modules and I solved this problem with RadGridView.
But hierarchical data very complex for last user on RadGridView, that's not user-friendly.

I decided on the RadTreeListView after that, and I solved this with hierarchical TreeListView.
But there's a problem, IsSynchronizedWithCurrentItem setted True but RadTreeListView with RadDataForm not working synchronous.

How can solve this problem?

<telerik:RadTreeListView x:Name="mRadTreeListView"
                     IsReadOnly="True"
                     AutoExpandItems="True"
                     AutoGenerateColumns="False"
                     CanUserFreezeColumns="False"
                     ItemsSource="{Binding Items}"
                     IsSynchronizedWithCurrentItem="True"
                     RowIndicatorVisibility="Collapsed"
                     RowDetailsVisibilityMode="Collapsed">
    <telerik:RadTreeListView.ChildTableDefinitions>
        <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
    </telerik:RadTreeListView.ChildTableDefinitions>
</telerik:RadTreeListView>
<telerik:RadDataForm x:Name="mRadDataForm"
                     ItemsSource="{Binding Items}"
                     VerticalAlignment="Top"
                     LabelPosition="Above"
                     AutoGenerateFields="False"
                     CommandButtonsVisibility="All"
                     AutoCommit="True">
</telerik:RadDataForm>
Vera
Telerik team
 answered on 10 Mar 2014
1 answer
209 views
I am trying to implement one of the screen in my project using RadWindow, and I wanted to do it as a singleton within the entire application.  This RadWindow will be shown as modal from time to time.   I know that using wpf windows, doing this will give you an invalidoperationexception:

win.ShowDialog();
win.Close();
win.ShowDialog();


I see that RadWindow is not derived from Window, so my question is, is it safe for me to do show or reopen the RadWindow even after it has been closed?
Kalin
Telerik team
 answered on 10 Mar 2014
3 answers
188 views
I'm using RadDataForm for the first time and to mr it seems there's an uncommon behavior. I've bound MyRadDataForm.ItemsSource to a property called 'UserList' which is of type 'ObservableCollection<UserViewModel>'. When I load users from database and add them to the ObservableCollection, then UI/RadDataForm gets updated via INotifiyPropertyChanged.

Now I want to refresh the displayed data so I clear the collection (UserList.Clear()), get the users from database again and then re-add those users to the collection (UserList.AddRange(usersFromDatabase). The problem is my UI doesn't get updated anymore. It seems that RadDataForm is only updating one time.
Dimitrina
Telerik team
 answered on 10 Mar 2014
1 answer
128 views
Hi,

Extra X and Y axis lines shows up on RadChart. For fixing this issue we need to write extra code to remove these extra lines.
Please refer document attached for more details.



To solve this issue we need to remove that extra line in code for X axis and Y axis separately.
(Code Snippet Below)

private void
HideUnusedAdditionalAxis()

        {

            FrameworkElement lastAxisObject =
null;

            FrameworkElement
notZeroItemAxisObject = null;

            var axisX2DObjects =
RelationshipSummaryDepositMonthlyBalanceChart.ChildrenOfType<AxisX2D>();

 

            foreach (var axisX2D in
axisX2DObjects)

            {

                axisX2D.Visibility =
System.Windows.Visibility.Hidden;

                lastAxisObject = axisX2D;

                if (axisX2D.Items.Count != 0)

                {

                    notZeroItemAxisObject =
axisX2D;

                }

            }

            if (lastAxisObject != null)

                (notZeroItemAxisObject ??
lastAxisObject).Visibility = System.Windows.Visibility.Visible;

        }

Peshito
Telerik team
 answered on 10 Mar 2014
5 answers
624 views
I'm trying to follow the tutorial here. http://www.telerik.com/help/wpf/radtreeview-styling-and-appearance-styling-radtreeviewitem.html

However, when I did the same thing, I couldn't find the option for editing a copy of the default style. The only option I had is creating an empty one which doesn't include anything thing. I also tried ItemContainerStyle, no luck also.




Did I miss anything?

Rellik
Top achievements
Rank 1
 answered on 10 Mar 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?