Telerik Forums
UI for WPF Forum
2 answers
85 views
Hello,

I already implemented some drag and drop behaviors in my application. To do so, I create a DragVisual in the OnDragInitialize event (registered via DragDropManager.AddDragInitializeHandler), and I give it a DataContext (a Content actually) and a ContentTemplate. Then I can have a nice preview of the data being dragged that I can template as I wish and that will follow the mouse cursor.
This work perfectly when I'm dragging data from my app, to my app.

Now I am willing to be able to drag files, from the windows explorer, to a specific control of my application. I would like to create a DragVisual in the same way, when the mouse cursor enters one of the windows of my application (and destroy it if the mouse cursor leaves the window, but this is another problem).

The problem is that when the drag starts from another application, OnDragInitialize is not invoked (which makes perfectly sense). But how can I achieve to create a DragVisual in this context? None of the other drag'n'drop-related events have a DragVisual in their EventArgs.

Thanks
Administrator
Telerik team
 answered on 04 Apr 2014
1 answer
239 views
Hi,

i'm looking for a RadDiagramToolbox xaml example, Shapes, Container,.. should be filled in xaml not codebehind...

<telerik:RadDiagramToolbox x:Name="toolbox" Grid.Column="0" Title="GALLERY" Width="220" HorizontalAlignment="Right" Grid.RowSpan="2"
                                       Header="{Binding SelectedItem.Header, RelativeSource={RelativeSource Self}}"
                                       Visibility="{Binding IsChecked, ElementName=toolboxButton, Converter={StaticResource BooleanToVisibilityConverter}}">               
<extensions:RadDiagramToolbox.HeaderBackground>
         <SolidColorBrush Color="#FF009494" telerik:Windows8Colors.Color="BoundColor" telerik:Windows8Palette.IsFreezable="True"/>
        </extensions:RadDiagramToolbox.HeaderBackground>
        ... ITEMS .... ??????????????????
</telerik:RadDiagramToolbox>

Thanks a lot
Best Regards
Rene
Pavel R. Pavlov
Telerik team
 answered on 04 Apr 2014
1 answer
179 views
Hi,

we crearte the Shapes like this:

MyGallery secondGallery = new MyGallery { Header = "Shapes" };
secondGallery.Shapes.Add(new Switch
{
         SN = "222",
         Content = "Start",
         Height = 80,
         Width = 80,
         Backcolor = "#009494",
         Forecolor = "#ffffff",
         Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.EllipseShape),
         Manufacturer = "Manufacturer 2.2"
});

then we bin the Shapes to the toolbox

<!--  ToolboxItemTemplate  -->
<DataTemplate x:Key="ToolboxItemTemplate1">
   <Border Width="130"
                   Height="80"
                   Margin="0 1 1 0"
                   Background="Transparent">
          <Grid>
              <Grid.RowDefinitions>
                 <RowDefinition Height="*" />                           
             </Grid.RowDefinitions>
             <Viewbox Grid.Row="0" Width="{Binding Width}" Height="{Binding Height}" Margin="5 10 5 0"   HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill">
                  <telerik:RadDiagramShape Margin="15" VerticalAlignment="Top" HorizontalContentAlignment="Center"               VerticalContentAlignment="Center" FontWeight="Bold"
                                                     Geometry="{Binding Geometry}" IsHitTestVisible="False" Content="{Binding Content}" FontSize="15" Foreground="{Binding Forecolor}"
                                                     Background="{Binding Backcolor}">   
               </telerik:RadDiagramShape>
           </Viewbox>                      
       </Grid>               
    </Border>           
</DataTemplate>
 
<!--  ToolboxGroupTemplate  -->
<HierarchicalDataTemplate x:Key="ToolboxGroupTemplate1"
                            ItemsSource="{Binding Shapes}"
                            ItemTemplate="{StaticResource ToolboxItemTemplate1}">
     <TextBlock Text="{Binding Header}" FontSize="13" />
</HierarchicalDataTemplate>

For example we habe a simple RectangleShape. With a cutom Tab in EditMode we select a Employee and now we want to edit the RectangleShape. Is it possible to change the view of the RectangleShape during runtim, for example see attached files.

Thanks a lot
Best Regards
Rene
Pavel R. Pavlov
Telerik team
 answered on 04 Apr 2014
1 answer
133 views
I am trying to make it so my user can change the theme at runtime in my project. It works fine for most of the controls, however the TabControl as well as the MenuItems and Menus do not change. Is there something I am missing? I looked at the quickstart samples but I don't have that dll in my binaries folder. Is that intentional?
Jonah
Top achievements
Rank 1
 answered on 03 Apr 2014
2 answers
186 views
I have a RadPivotGrid setup as follows which gives the error stated in the title "The attachable property 'DataProvider' was not found in type 'RadPivotGrid'"
            <pivot:RadPivotGrid>
                <pivot:RadPivotGrid.DataProvider>
                    <pivot:LocalDataSourceProvider ItemsSource="{Binding Path=Events2}"/>
                </pivot:RadPivotGrid.DataProvider>
            </pivot:RadPivotGrid>

This is in Visual Studio 2013 Express with Telerik Q1 2014 WPF 4.5.

I also made sure I have the following references (and some extra):
Telerik.Pivot.Core
Telerik.Windows.Controls.Pivot
Telerik.Windows.Controls
System.Runtime.Serialization

It does compile but no interface is shown. Events is a list of standard objects with properties. If all works well should I assume that it just prints a flat grid with the above definition?
Wouter
Top achievements
Rank 1
 answered on 03 Apr 2014
7 answers
221 views
Hello everybody :)

I would like to know how to implement the drag and drop functionality between two TreeListViews.
I really appreciate it, if you can send me a working WPF project sample with this functionality.

Thanks, in advance, for your time.
Best regards.
Jorge

Manuel
Top achievements
Rank 1
 answered on 03 Apr 2014
7 answers
268 views
I  have my VSPackage extention for VS2010. 
I have tried to use with the GridView in my custom window pane, but  I have exception.
I referenced are following assemblies :
            Telerik.Windows.Controls
            Telerik.Windows.Controls.Data
            Telerik.Windows.Controls.Input
            Telerik.Windows.Controls.GridView
            Telerik.Windows.Data

I don't know what is missing?
I use the 2013.2.724.40 version.

[ERROR - 2014-03-19 16:03:46] FOUNDATION: Exception occurred. Message: System.Windows.Markup.XamlParseException: Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception. ---> System.Exception: Cannot find resource named 'Telerik.Windows.Controls.GridViewDataColumn'. Resource names are case sensitive.
   at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)
   --- End of inner exception stack trace ---
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
Sia
Telerik team
 answered on 03 Apr 2014
1 answer
131 views
Hello !
When i'm using filtering like described in:
http://www.telerik.com/help/wpf/radtreeview-how-to-implement-search-filter-sort.html

I'm not able to tab into the Treeview Control to select an item only with Keyboard Navigation.
The whole TreeView Control is selected (seen on Frame) but i can't select an Item.
If i select one first with the Mouse then i can use Keyboard Navigation.
But i want the user to use only Keyboard Navigation.

This behaviour can be tested with the Demo 'TreeView / FilterSearchSort' in the xaml-sdk.

If i tab through the FilterSearchSort Demo without any Input then i can Stop in the TreeView and Select the First Item with the Space Key.
If i filter the TreeView this doesn't work.

Any Suggestion ?
Boris
Telerik team
 answered on 03 Apr 2014
1 answer
216 views
Hi, is there any way to restore all close, floating or hiding windows in wpf. I can only use code like this 

           if (mnuSymbols.IsChecked == false)
            {
                radPaneSymbols.RemoveFromParent();
            }
            else
            {
                radGroup0.Items.Add(radPaneSymbols);
            }

I need someting like a winforms redock service. Is it available in wpf?
Vladi
Telerik team
 answered on 03 Apr 2014
1 answer
91 views
Hello, I'm trying to select a cell in code, " http://www.telerik.com/help/wpf/gridview-how-to-set-current-cell.html" but the grid does not seem to set it the way it would if a user clicked into the cell. The problem is that the focus rectangle moves to that cell, but the background stays on the previous cell. I'm only allowing selection by single cell, not the whole row so I don't know if that matters. Also, the SelectedCells IList is 0, but if a user selected the cell, the list would have that cell included in it. Do I need to do something else to make this work like a user clicking into the cell?

Thanks,
Scott
Yoan
Telerik team
 answered on 03 Apr 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?