Telerik Forums
UI for WPF Forum
2 answers
132 views

Is there any way to force the radribbongroup into not center the header horizontally (I want strech)?

Thanks

Inger Marie

Inger Marie
Top achievements
Rank 1
 answered on 24 Feb 2017
1 answer
170 views

Hello,

We are currently using some of your components and we are facing a lot of issues while using RadTreeView. 

Most of them are related to drag/drop operations and the new position of the item in the new TreeView.

As you can see in the video that i attatched everything is working fine until the middle of the video after dragging 5 items to the new TreeView the drag template becomes unstable and blinks, after adding that one to the tree you are not able to keep dragging more items.

The only thing that we modifed is the item template and we are using the latest binaries of UI for WPF.

What we can do?

Thanks

Here you can find the video

https://www.dropbox.com/s/xy6pgw5toynbvpk/dragIssue.mp4?dl=0

 

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Feb 2017
1 answer
271 views

Hi,

I have a fairly simple scenario that I am having trouble with. I have a custom data annotation as shown below. It just makes sure that at least one item in my collection has it's IsSelected flag set.  This collection is bound to an ItemsControl of checkboxes. The xaml is at the bottom. The validation works correctly but the error message displayed in  summary at the bottom if the form is not red and is prefixed with a colon. Is there a way to make this a little better and more consistent with "normal" dataannotation validations so that the ItemsControl or containing stackpanel is highlighted in a similar fashion as a textbox might be highlighted?

Thanks ... Ed

public class HasOneItem : ValidationAttribute
{
    public HasOneItem() {}
 
    protected override ValidationResult IsValid(object value, ValidationContext validationContext)
    {
        if (value != null)
        {
            ObservableCollection<SampleTechniqueInfo> sti = (ObservableCollection<SampleTechniqueInfo>)value;
            if ((from a in sti where a.IsSelected == true select a).Count() == 0)
            {
                var errorMessage = FormatErrorMessage(validationContext.DisplayName);
                return new ValidationResult(errorMessage);
            }
        }
        return ValidationResult.Success;
    }
}
 
 
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="2" Grid.RowSpan ="5">
    <Label Content="Associated Techniques:"  HorizontalAlignment="Left" HorizontalContentAlignment="Left"  Width="350" Height="auto"/>
    <StackPanel Orientation="Vertical" MaxHeight="210" >
        <ItemsControl x:Name ="lstTechniques" ItemsSource="{Binding AssociatedTechniques }"
                        Margin="5,0,0,0"
                        >
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
 
                    <support:UniformGridWithOrientation Orientation="Vertical"  Columns="4"  />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate >
                    <CheckBox Content="{Binding TechniqueAbbr}"
                                IsChecked="{Binding IsSelected, Mode=TwoWay}"
                                ToolTip="{Binding TechniqueName}"
                                      
                        >
 
                    </CheckBox>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
 
    </StackPanel>
</StackPanel>
Yoan
Telerik team
 answered on 24 Feb 2017
1 answer
335 views
I would like to add a checkbox to the headers of columns in a GridView. I tried to replace the textbox defined for the telerik:GridViewDataColumn.Header with a checkbox, but it doesn't respond to clicks. I would like to have text for the header, but also have it respond as a checkbox so that I can "highlight" the specific column for other calculations.
Martin
Telerik team
 answered on 24 Feb 2017
5 answers
725 views

From the drag drop examples on the site, the dragging and dropping within and between grid views is more or less working how we want. But I would like to change the icon in the visual associated with the "effect" and I can't seem to figure out how and where to do it. We have a content template but that only affects the rest of the visual and not the "effect" portion of it.

I tried inheriting from the DragVisual but there are so many overridable things within I can't tell what is needed to be done. One thing however that was particularly interesting, is that when I inherit from the DragVisual but do not override anything within, the "move" icon is gray instead of blue.

I am trying to achieve displaying a delete icon if the user drags an item outside of the grid to indicate that the item will be removed rather than the "no" icon which implies that the action will have no result. Please advise if there is a simpler way to do this.

Stefan Nenchev
Telerik team
 answered on 24 Feb 2017
2 answers
253 views

Hello Telerik,

During a Drag&Drop in a RadTreeView, I encounter some troubles with TreeViewDragDropOptions where the dropped item is positioned. Ideally I would like to get the objects that are positioned before and after (if they exist) the dropped item.

However, following multiple found example (like this one), in my case, the content of TreeViewDragDropOptions is always null.

Those are the objects I am binding to the TreeView:

Node.cs

public class Node<T>
{
   public T Source
   {
      get; set;
   }
 
   public Node<T> Parent
   {
      get; set;
   }
 
   public List<Node<T>> Children = new List<Node<T>>();
}

 

Here T is a Category

Category.cs

public class Category
{
   public string Title
   {
      get; set;
   }
 
   public int Sort
   {
      get; set;
   }
}

 

In the ViewModel, an ObservableCollection contains the hierarchy.

public ObservableCollection<Node<Category>> MyCategories
{
  [...]
}

 

Finally, the Views:

MyView.xaml

<telerik:RadTreeListView Name="CategoriesRadTreeView"
  IsDragDropEnabled="True" telerik:TreeViewSettings.DragDropExecutionMode="New"
  ItemsSource="{Binding MyCategories}"
  AutoGenerateColumns="False">
 
   <telerik:RadTreeListView.ChildTableDefinitions>
      <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
   </telerik:RadTreeListView.ChildTableDefinitions>
          
   <telerik:RadTreeListView.SortDescriptors>
      <telerik:SortDescriptor Member="Source.Sort" SortDirection="Ascending" />
   </telerik:RadTreeListView.SortDescriptors>
          
   <telerik:RadTreeListView.Columns>
      <telerik:GridViewDataColumn DataMemberBinding="{Binding Source.Title}" Header="Title" />
      <telerik:GridViewDataColumn DataMemberBinding="{Binding Source.Sort}" Header="Sort" />
   </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

 

And the code behind:

MyView.xaml.cs

public WebstoreKatalogView()
{
   InitializeComponent();
 
   DragDropManager.AddDragInitializeHandler(CategoriesRadTreeView, OnDragInitialize);
   DragDropManager.AddDragOverHandler(CategoriesRadTreeView, OnDragOver, true);
   DragDropManager.AddDropHandler(CategoriesRadTreeView, OnDrop);
}
 
private void OnDragInitialize(object sender, DragInitializeEventArgs e)
{
   e.AllowedEffects = DragDropEffects.All;
   var payload = DragDropPayloadManager.GeneratePayload(null);
   var data = ((FrameworkElement)e.OriginalSource).DataContext;
   payload.SetData("DragData", data);
   e.Data = payload;
   e.Handled = true;
}
 
private void OnDragOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
   var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
   if (options != null)
   {
      // never reaches here!
   }
}
 
private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
   // this works!
   var node = DragDropPayloadManager.GetDataFromObject(e.Data, "DragData");
}

 

I have no idea what is wrong or what could be missing.

Thank you very much for your help!

 

Sylvain

 

Sylvain
Top achievements
Rank 1
 answered on 24 Feb 2017
1 answer
124 views

I've tried all the options for KeyboardNavigation.TabNavigation and none of them seem to get the desired result. How to enable tabbing through fields of a RadDataForm displayed via a RadGridView row details template?

Thanks ... Ed

 

Stefan Nenchev
Telerik team
 answered on 24 Feb 2017
9 answers
321 views
I have set IsPinned=false in the docking rad pane, but upon load it is showing animation and then hiding it. Is there any way i can disable that animation? I am using RadControls for WPF Q2 2010 version# 2010.2.714.40

Appreciate your help,
Thanks!
Georgi
Telerik team
 answered on 24 Feb 2017
12 answers
1.3K+ views
hi,

1. i have a dock control in a grid, the Height of the the row is set to "auto" and i get an exception:
"Placing Docking control in a panel or control that measures it with infinite width or height is not supported in the current version. You can disable this error by setting the AllowUnsafeMode property of the RadDocking control."

if the Height is set to a number or to " * " it's works fine.
is this behavior normal?

2. one other thing (a small one):
when a pane is set to auto-hide, i place the mouse pointer on it and it shows, 
then when i place the pointer on the top of the pane, 
between the header text and the buttons the pane hides again, a little annoying, i've checked it on another 
computer and this happens again.

thanks in advance,

Lior.


Georgi
Telerik team
 answered on 24 Feb 2017
8 answers
224 views
Hi,

I downloaded the demo code and ran it with Visual Studio 2012 on Windows 7.
When I click on Explore All Controls and then on Radial Menu, this Exception is thrown:

FileNotFoundException
Could not load file or assembly 'Telerik.Windows.Themes.Windows8, Culture=neutral' or one of its dependencies. The system cannot find the file specified.

at this location in the code:
> QuickStart.Common.dll!Telerik.Windows.Controls.QuickStart.Common.Helpers.ApplicationThemeManager.EnsureFrameworkElementResourcesForTheme(System.Windows.FrameworkElement element, string themeName) Line 257 + 0x31 bytes C#

Sebastien
Kalin
Telerik team
 answered on 23 Feb 2017
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?