Telerik Forums
UI for WPF Forum
1 answer
176 views
Hello!

The datacontext of my custom RadRibbonBackstage changes after the ribbonview is fully loaded.

Doesn't matter if I set it's datacontext before or after the InitializeComponent() call in the constructor, I even tried to set it through xaml.

For now I can set the datacontext in the Loaded+= event of my backstage, but seems a crappy solution. I would like to know if this is a correct behavior of the control, or if I am doing something wrong.

I have attached a project where youll be able to easily reproduce the situation, change the extension from png to zip.
Martin Ivanov
Telerik team
 answered on 08 Aug 2014
2 answers
165 views
Hi,

how do i change the border color and tooltip when hovering the mouse over a palette color?.

Thanks.
Jesper
Top achievements
Rank 2
 answered on 08 Aug 2014
3 answers
165 views
I have a MainWindow with various tabs. One of them is a Contextual Tab. I want to set the Contextual Tab's IsActive to the boolean IsFormAgentVisible value which is a public property in my MainWindow.xaml.cs

I'm entirely new to WPF so I'm not sure a normal public property is the best way to go here. When I click on a ribbon button to launch a specific Window I set the IsFormAgentVisible to true. At this point I want to the contextualGroupFormAgents ContextualGroup below to be updated so that IsActive is now true. Hopefully this is a pretty simple task to perform. Thanks.


Contextual Tab code from the MainWindow.xaml:
             <telerik:RadRibbonView.ContextualGroups>
                <telerik:RadRibbonContextualGroup x:Name="contextualGroupFormAgents" />
            </telerik:RadRibbonView.ContextualGroups>

            <telerik:RadRibbonTab Header="Form Agents" ContextualGroupName="contextualGroupFormAgents">
                <telerik:RadRibbonGroup Header="Primary Details">
                    <telerik:RadRibbonDropDownButton Content="Change Primary Details" Click="ChangePrimaryDetailsDropDown_Click" />
                    <telerik:RadRibbonButton Content="Obsolete Forms"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Process Status">
                    <telerik:RadRibbonDropDownButton Content="Update Process Status" Click="UpdateProcessStatusDropDown_Click" />
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Memos">
                    <telerik:RadRibbonButton Content="Add Memos"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Submittal Details">
                    <telerik:RadRibbonDropDownButton Content="Change Submittals" Click="ChangeSubmittalsDropDown_Click"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>

MainWindow.xaml.cs public property:
          public bool IsFormAgentVisible { get; set; }        
Julian
Top achievements
Rank 1
 answered on 07 Aug 2014
1 answer
116 views
Hi, We are binding a list with both RadListBox(s) (small and large icon view) and RadCarousel to allow the user to see the same list in multiple ways. We need to allow the ability to drag items. At this point, we have enabled the List box to allow Drag and we would like to do the same thing with the RadCarousel (Drag the top most item/ image in the Carousel). Please help us with some sample code to enable the drag behavior from Carousel.
In the below code, I have both the RadListBox(s) and Carousel code.
    <UserControl.Resources>
        <conv:ByteArrayToImageBrush x:Key="byteArrayToImageBrushConverter" />
        <conv:BooleanToString x:Key="booleanToStringConverter" />
        <conv:StringToVisibility x:Key="stringToVisibilityConverter" />
        <Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
        </Style>
        <Path x:Key="horizontCarouselPath" Stretch="Fill" Opacity="1" Data="M 9,200 C9,200 450,200 450,200 "
              Stroke="{StaticResource PrimaryLayoutBorderBrush}" StrokeThickness="1" />
    </UserControl.Resources>
 
<Grid Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="0" Margin="0,10,0,0">
                    <!--Small Icon View -->
                    <telerik:RadListBox x:Name="DocumentPageRadListBoxSmall"
                                        ItemsSource="{Binding SelectedPackDocumentPages}"
                                        ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                                        ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionMode="Extended"
                                        Visibility="{Binding PageLayoutView, Converter={StaticResource stringToVisibilityConverter}, ConverterParameter=SmallIconView}" BorderThickness="1" BorderBrush="{StaticResource PrimaryLayoutBorderBrush}">
                        <telerik:RadListBox.ItemTemplate>
                            <DataTemplate>
                                <Border Background="{StaticResource DropzoneBackgroundBrush}" Margin="0,4,0,0" BorderBrush="{StaticResource PrimaryLayoutBorderBrush}"
                                        BorderThickness="1" Height="155" Width="85">
                                    <StackPanel Orientation="Vertical">
                                        <Image
                                            Source="{Binding Converter={StaticResource byteArrayToImageBrushConverter}, Path=PageBytes}"
                                            Height="130" Width="80" HorizontalAlignment="Center"
                                            VerticalAlignment="Center" />
                                        <Label Content="{Binding PageLabel}" Style="{StaticResource Label}"
                                               HorizontalAlignment="Center" Margin="0,0,0,0" />
                                    </StackPanel>
                                </Border>
                            </DataTemplate>
                        </telerik:RadListBox.ItemTemplate>
                        <telerik:RadListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBox.DragDropBehavior>
                            <behaviors:DragDropCopyBehavior />
                        </telerik:RadListBox.DragDropBehavior>
                    </telerik:RadListBox>
 
                    <!--Large Icon View -->
                    <telerik:RadListBox x:Name="DocumentPageRadListBoxLarge"
                                        ItemsSource="{Binding SelectedPackDocumentPages}"
                                        ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                                        ScrollViewer.HorizontalScrollBarVisibility="Auto" SelectionMode="Extended"
                                        Visibility="{Binding PageLayoutView, Converter={StaticResource stringToVisibilityConverter}, ConverterParameter=LargeIconView}" BorderThickness="1" BorderBrush="{StaticResource PrimaryLayoutBorderBrush}">
                        <telerik:RadListBox.ItemTemplate>
                            <DataTemplate>
                                <Border Background="{StaticResource DropzoneBackgroundBrush}" Margin="0,4,0,0" BorderBrush="{StaticResource PrimaryLayoutBorderBrush}"
                                        BorderThickness="1" Height="Auto" Width="Auto">
                                    <StackPanel Orientation="Vertical">
                                        <Image
                                            Source="{Binding Converter={StaticResource byteArrayToImageBrushConverter}, Path=PageBytes}"
                                            Height="300" Width="170" HorizontalAlignment="Center"
                                            VerticalAlignment="Center" />
                                        <Label Content="{Binding PageLabel}" Style="{StaticResource Label}"
                                               HorizontalAlignment="Center" Margin="0,0,0,0" />
                                    </StackPanel>
                                </Border>
                            </DataTemplate>
                        </telerik:RadListBox.ItemTemplate>
                        <telerik:RadListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </telerik:RadListBox.ItemsPanel>
                        <telerik:RadListBox.DragDropBehavior>
                            <behaviors:DragDropCopyBehavior />
                        </telerik:RadListBox.DragDropBehavior>
                    </telerik:RadListBox>
 
                    <!--Carousel View -->
                    <telerik:RadCarousel x:Name="DocumentPageRadCarousel" HorizontalContentAlignment="Center"
                                         VerticalContentAlignment="Top"
                                         ItemsSource="{Binding SelectedPackDocumentPages}"
                                         AutoGenerateDataPresenters="False" Background="Transparent"
                                         Visibility="{Binding PageLayoutView, Converter={StaticResource stringToVisibilityConverter}, ConverterParameter=CarouselView}"
                                         Panel.ZIndex="4" FlowDirection="LeftToRight"
                                         HorizontalScrollBarVisibility="Auto" BorderThickness="1" BorderBrush="{StaticResource PrimaryLayoutBorderBrush}">
                        <telerik:RadCarousel.Resources>
                            <DataTemplate DataType="{x:Type workflow:DocumentPackPage}">
                                <Image
                                    Source="{Binding Converter={StaticResource byteArrayToImageBrushConverter}, Path=PageBytes}"
                                    HorizontalAlignment="Center" VerticalAlignment="Center" Height="400" Width="300" />
                            </DataTemplate>
                        </telerik:RadCarousel.Resources>
                        <telerik:RadCarousel.ItemsPanel>
                            <ItemsPanelTemplate>
                                <telerik:RadCarouselPanel Path="{StaticResource horizontCarouselPath}" />
                            </ItemsPanelTemplate>
                        </telerik:RadCarousel.ItemsPanel>
                    </telerik:RadCarousel>
                </Grid>
Dimitrina
Telerik team
 answered on 07 Aug 2014
0 answers
90 views
<telerik:RadGridView ItemsSource="{Binding Path=ShipCollection, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay}"
                                     SelectionMode="Single" SelectedItem="{Binding Path=SelectedEvent, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay}" 
                                     AutoGenerateColumns="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" CanUserDeleteRows="False" IsFilteringAllowed="True">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="NASA Ship" DataMemberBinding="{Binding Ship, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay}" Width="*" IsReadOnly="True" />
                       
                        <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding Visible, Mode=TwoWay}" FilterMemberPath="Visible" IsFilterable="True" ShowFilterButton="False" />-->                                                 
                    </telerik:RadGridView.Columns>                    <telerik:RadGridView.FilterDescriptors>
                        <data:CompositeFilterDescriptor LogicalOperator="Or">
                            <data:CompositeFilterDescriptor.FilterDescriptors>
                                <data:FilterDescriptor Member="Visible" Operator="IsEqualTo" Value="True" />
                            </data:CompositeFilterDescriptor.FilterDescriptors>
                        </data:CompositeFilterDescriptor>
                    </telerik:RadGridView.FilterDescriptors>                </telerik:RadGridView>
kity
Top achievements
Rank 2
 asked on 07 Aug 2014
2 answers
283 views
While Migrating Winforms to WPF,Insted of "TreeNodeCollection" what Collection can i use for RadTreeView in WPF.Now I am getting error like"Cannot implicitly convert type System.Windows.form.TreeNode to Telaric.Windows.Controls.RadTreeView."

EX:

 private void ConvertXmlNodeToTreeNode(XmlNode xmlNode, TreeNodeCollection treeNodes)
        {

            RadTreeView newTreeNode = treeNodes.Add(xmlNode.Name); Error:Cannot implicitly convert type System.Windows.form.TreeNode to Telaric.Windows.Controls.RadTreeView."

           foreach (XmlAttribute zzz in xmlNode.Attributes)
                {
                    ConvertXmlNodeToTreeNode(zzz, newTreeNode.Items);  Error:For this had some invalid arguments.
                }
       }
Please Help me ASAP.

Regards,
Ranjith

Martin Ivanov
Telerik team
 answered on 07 Aug 2014
3 answers
215 views
Is there an easy way using the GridView to hide rows?

I have a GridView that has rows with possible components and I must add or remove them in a list. Like in the picture

Thanks,
Sieg
kity
Top achievements
Rank 2
 answered on 07 Aug 2014
3 answers
195 views
Basically I have a parent-child situation I want to display in a flat grid. But for a series of consecutive rows with the same parent, I only want the first row to show the parent values.

It is basically the same as this question, but for WPF instead of WinForms.

How is it possible to achieve this?
kity
Top achievements
Rank 2
 answered on 07 Aug 2014
0 answers
79 views
 
 How to hide programaticly rows?
 
 bool: Visible is property in collection NasaShipsCollection
 
<br> <telerik:RadGridView ItemsSource="{Binding Path=NasaShipsCollection, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay}" <br>                                     SelectionMode="Single" SelectedItem="{Binding Path=SelectedEvent, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true, NotifyOnValidationError=true, Mode=TwoWay}"  <br>                                     AutoGenerateColumns="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" CanUserDeleteRows="False" IsFilteringAllowed="True"><br>                    <telerik:RadGridView.Columns><br>                        <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding EShip}" />                        <br>                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Visible, Mode=TwoWay}" FilterMemberPath="Visible" IsFilterable="True" ShowFilterButton="False" ><br>                            <telerik:GridViewDataColumn.FilteringControl><br>                                <controls1:BoolenFilteringControl  /><br>                            </telerik:GridViewDataColumn.FilteringControl><br>                        </telerik:GridViewDataColumn><br>                    </telerik:RadGridView.Columns>                                   <br>                </telerik:RadGridView><br>


public partial class EventField : IDataErrorInfo, IFilterDescriptor
{
#region IFilterDescriptor public Expression CreateFilterExpression(Expression instance)
 {
  return instance;
 }#endregion
}
public class BoolenFilteringControl :UserControl, IFilteringControl
{
 private bool _isActive; public void Prepare(GridViewColumn columnToPrepare)
 {
  // throw new System.NotImplementedException();
 } public bool IsActive
 {
  get
  {
   return true;
   // return _isActive;
  }
  set
  {
   _isActive = value;
  }
 }
}
kity
Top achievements
Rank 2
 asked on 07 Aug 2014
1 answer
434 views
My application contains a RadListbox and I'd like to drag and drop items in this RadListBox from one instance of my application to another instance. How can I accomplish this?

It's similar to wanting the CustomDragVisualStyle_WPF example to support drag and drop between instances instead of just allowing drag and drop within one instance.

I got it working with copy/paste buttons, but I also want to support drag and drop.
Kalin
Telerik team
 answered on 07 Aug 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
SplashScreen
Rating
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
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?