Telerik Forums
UI for WPF Forum
1 answer
240 views

Hello,

This is my first wpf thread and i have started working on window. I am trying to set RadWindow as mainwindow as i have seen and downloaded sample project by using the following post.

 http://www.telerik.com/support/kb/wpf/window/details/how-to-use-radwindow-as-main-window

 But when i copy and paste code in my project and runs, it open two windows one window is fine and displaying it as expected and second window shows the same window under the browser type window. ​Image is attach after an application runs. Please anyone help ​to rectify my issue.

Thanks in advance :).

 

Anson
Top achievements
Rank 1
 answered on 30 Nov 2015
2 answers
97 views
Is any method to set item can not drag out of diagram
rui
Top achievements
Rank 1
 answered on 30 Nov 2015
3 answers
284 views

Hi!

I need use a different image from data base, i will asign the image(PNG) in order of an specific process.

The images recovered from data base are created in a temporal folder in order to use them in the dynamic process when i need chage the image.

At this moment the asignation of an image is ok but i can not see the image in the button:

RadRibbonButton objArea = new RadRibbonButton();
objArea.LargeImage = new BitmapImage(new Uri(auxPath + (string)dt.Rows[i].ItemArray[1], UriKind.Relative));
objArea.Size = Telerik.Windows.Controls.RibbonView.ButtonSize.Large;

If i use a RadRibbonButton created manually in xaml, i can change the image and the result is ok.

//control created in xaml
btnExample.LargeImage = new BitmapImage(new Uri(auxPath + (string)dt.Rows[i].ItemArray[1]));

If you help me i will be greateful.

Dinko | Tech Support Engineer
Telerik team
 answered on 27 Nov 2015
1 answer
242 views

Hi,

 

i'm looking for help with removing lines/border from column where i have hierarchical tree.

 

Property GridLinesVisibility is not solution because removes/adds lines in whole grid, but i want remove only in my first column.

 

I created styles based on GridviewCellStyle and applied them to cells, but without any results. RadTreeListView shows or not lanes only according to GridLinesVisibility, my styles changes nothing.

 

<Window.Resources>
        <Style x:Key="CellWithoutLanes" TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
            <Setter Property="BorderThickness" Value="0" />
        </Style>
 
        <Style x:Key="CellWithLanes" TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
            <Setter Property="BorderBrush" Value="Black"/>
            <Setter Property="BorderThickness" Value="5,5,5,5" />
        </Style>
    </Window.Resources>
     
    <Grid>      
        <telerik:RadTreeListView ItemsSource="{Binding Processes}"
                                 AutoGenerateColumns="False"
                                 TreeLinesVisibility="Visible"
                                 RowIndicatorVisibility="Collapsed">
            <telerik:RadTreeListView.ChildTableDefinitions>
                 
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}" />
                 
            </telerik:RadTreeListView.ChildTableDefinitions>
             
            <telerik:RadTreeListView.Columns>
                 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
                                            Header="Element"
                                            CellStyle="{StaticResource ResourceKey=CellWithoutLanes}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                 
                                <TextBlock Grid.Column="0" Text="{Binding Id}"/>
                                <TextBlock Grid.Column="1" Text="{Binding Name}"/>
                            </Grid>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}"
                                            Header="Id"
                                            CellStyle="{StaticResource ResourceKey=CellWithLanes}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Expression}"
                                            Header="Expression"
                                            CellStyle="{StaticResource ResourceKey=CellWithLanes}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding UserPriority}"
                                            Header="UserPriority"
                                            CellStyle="{StaticResource ResourceKey=CellWithLanes}" />
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>
         
                
    </Grid>

 

Best regards,

Jakub.

Stefan Nenchev
Telerik team
 answered on 27 Nov 2015
5 answers
200 views
Hi,

I wanna have my Group Header Row with aggregates in columns, like happens with PivotGrid.
I've done a Style like this:

        <Style TargetType="telerik:GroupHeaderRow">
            <Setter Property="ShowGroupHeaderColumnAggregates" Value="True" />
            <Setter Property="ShowHeaderAggregates" Value="False" />
        </Style> But the result is double lines: one for group title and another to aggregates. I wanna aggregates in same line that group title but in collumns. Regards, JP.

Stefan
Telerik team
 answered on 27 Nov 2015
2 answers
76 views

On RowValidating, when a GridViewCellValidationResult is added with a PropertyName such as "Hours", and a column that precedes the Hours column has a binding path of say "SourceHours", the GridView logic incorrectly does a .Contains() on the PropertyName to get the cell, which leads to the SourceHours column being highlighted as the one with the validation error, instead of the Hours column.

I'm using Telerik.Windows.Controls.GridView, Version=2015.3.1104.45, and the offending method is Telerik.Windows.Controls.GridView.GridViewRow.TryGetCellFromPropertyName.

Here's the relevant XAML:

                    <telerik:GridViewDataColumn Header="Source Hours" DataMemberBinding="{Binding SourceHours}" DataFormatString="n" TextAlignment="Right" />

                    <telerik:GridViewDataColumn Header="Hours" DataMemberBinding="{Binding Hours}" DataFormatString="n" TextAlignment="Right" />

And here is how I'm adding the GridViewCellValidationResult in the RowValidating event handler:

if (attendance.Hours == 0m) {

    e.ValidationResults.Add(new GridViewCellValidationResult { PropertyName = "Hours", ErrorMessage = "Hours cannot be zero."});

}

And this is why it's failing ( the Contains(this.propertyName) part):

internal bool TryGetCellFromPropertyName(string propertyName, out GridViewCell gridViewCell)
        {
            Func<GridViewBoundColumnBase, bool> func = (GridViewBoundColumnBase c) => c.GetDataMemberName().Contains(this.propertyName);
            GridViewDataControl gridViewDataControl = base.GridViewDataControl;
            if (string.IsNullOrEmpty(propertyName) || gridViewDataControl == null)
            {
                gridViewCell = null;
                return false;
            }
            gridViewCell = (
                from c in base.Cells.OfType<GridViewCell>()
                where c.DataColumn != null
                select c).FirstOrDefault<GridViewCell>((GridViewCell c) => func(c.DataColumn));
            return gridViewCell != null;
        }

If it instead was coded as c.GetDataMemberName() == this.propertyName (or similarly ignoring case if desired), it seems to me that it would work as expected.

For now I will use a UniqueName to get around the issue, but I wanted to bring it to Telerik's attention.

Dilyan Traykov
Telerik team
 answered on 27 Nov 2015
6 answers
416 views

Hello.

I'am trying to bind ViewModel property to a CommandProperty of a GridViewCheckBox inside of CreateCellElement. Unfortunately the binded command doesn't run while clicking on checkbox. Any ideas why this isn't working?

I'm posting the code where I belive is the mistake. I have made a test Visual Studio 2013  project to try to solve this. It is enable to download here: HERE

Creating  cell element:

internal class GroupDataGridCheckBoxColumn : GridViewCheckBoxColumn
   {
       private readonly Group _group;
 
       public GroupDataGridCheckBoxColumn(Group group)
           : base()
       {
           this._group = group;
           this.AutoSelectOnEdit = true;
           this.EditTriggers = GridViewEditTriggers.CellClick;
       }
 
       public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
       {
           GridViewCheckBox checkBox = base.CreateCellElement(cell, dataItem) as GridViewCheckBox;
 
           /// <THIS DOESNT WORK>
 
           /* Set Command binding */
           Binding commandBinding = new Binding("DataContext.AddOrRemoveGroupCommand");
           commandBinding.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(Window), 1);
           checkBox.SetBinding(CheckBox.CommandProperty, commandBinding);
 
           /* Set Command parameter */
           MultiBinding commandParameterBinding = new MultiBinding();
           commandParameterBinding.Converter = new CommandParameterMultiConverter();
           commandParameterBinding.Bindings.Add(new Binding("IsChecked") { RelativeSource = RelativeSource.Self });
           commandParameterBinding.Bindings.Add(new Binding(".")); //the employee object
           commandParameterBinding.Bindings.Add(new Binding(".") { Source = this._group }); //the group object
           checkBox.SetBinding(CheckBox.CommandParameterProperty, commandParameterBinding);
 
           /// <THIS DOESNT WORK/>
 
           return checkBox;
       }
   }

 

Any ideas? This error consumed 1 day of my work for now..

Stefan Nenchev
Telerik team
 answered on 27 Nov 2015
1 answer
132 views

I was trying to figure out why the titles of my RadPanes were not being translated.  I finally figured out that the LoadLayout() also loads the header of the panes and that overrides my XAML's {x:Static properties:Resources.xxx}.

I could say "After the LoadLayout(), change the title of each pane according to the resource strings" but it would be nice if it could be done directly in the XAML.  I don't believe there's a way to prevent the "Header" tag from being included in the SaveLayout/LoadLayout functions, right?  To tell you the truth, I don't even see why the header is included at all!

 

Vladi
Telerik team
 answered on 27 Nov 2015
4 answers
247 views
Hi, 

I am using Q1 2012 wpf controls in my project.
The filter popup shows the list of distinct values that are not scrollable and thus the popup is way too long to fit on the form. all the buttons and other controls are located below the screens bottom edge and not accessible by user.

Is there a way to limit size of the listbox, to let say 10 rows and have a scrolling added? Otherwise the filtering is absolutely useless.

Please see attached image of the filter popup
Christian
Top achievements
Rank 1
 answered on 27 Nov 2015
1 answer
166 views

Hi!

The DocxFormatProvider resets any Color informations of any Styles to the default light blue when I export with it.

 I export like this:

DocumentFormatProviderBase format = null;
 
format = new DocxFormatProvider();
 
format.Export(radRichTextBox.Document, File.Open(filename, FileMode.Create));

I used versions 2015.3.1104.45, 2015.3.1104.40 and 2015.3.930.40

Did i miss some setting or, if not, is there any workaround?

It works fine with the htmlformatprovider, but i need the header and footer, which is cut off by it.

 

 


 
 
 
 
 
 
Tanya
Telerik team
 answered on 26 Nov 2015
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?