Telerik Forums
UI for WPF Forum
2 answers
208 views

Hello together,

I use a RadPanelBar to display a List of Dates in a range grouped by week (to better understand I added a picture). If I click a day I want to load right beside it a Datatable into a RadGridView based on the date I selected.

I managed to bind the RadPanelBar to my ViewModel:

<telerik:RadPanelBar
    Grid.Column="0"
    x:Name="rpbKWs"
    ExpandMode="Multiple"
    ItemsSource="{Binding WochenAnzeige}"
    SelectedItem="{Binding selTag, Mode=TwoWay}"
    >
    <telerik:RadPanelBar.ItemTemplate>
        <HierarchicalDataTemplate
            ItemsSource="{Binding TageAnzeige}"
            >
            <HierarchicalDataTemplate.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock
                            FontWeight="Medium"
                            Text="{Binding Path=Datum, StringFormat={}{0:dd.MM.yyyy}}"
                            />
                        <TextBlock
                            Margin="0 5 0 0"
                            FontSize="{StaticResource Caption}"
                            Text="{Binding Path=Einträge, StringFormat={}Einträge: {0}}"
                            />
                        <TextBlock
                            Margin="0 2 0 0"
                            FontSize="{StaticResource Caption}"
                            Text="{Binding Path=EinträgeImWerk, StringFormat={}davon im Werk: {0}}"
                            />
                        <TextBlock
                            Margin="0 2 0 0"
                            FontSize="{StaticResource Caption}"
                            Text="{Binding Path=EinträgeMontageEingeteilt, StringFormat={}davon in Montage: {0}}"
                            />
                    </StackPanel>
                </DataTemplate>
            </HierarchicalDataTemplate.ItemTemplate>
            <StackPanel>
                <TextBlock
                    FontWeight="Medium"
                    >
                    <TextBlock.Text>
                        <MultiBinding
                            StringFormat="{}KW {0} Jahr {1}"
                            >
                            <Binding
                                Path="KW"
                                />
                            <Binding
                                Path="Jahr"
                                />
                        </MultiBinding>
                    </TextBlock.Text>
                </TextBlock>
                <TextBlock
                    FontSize="{StaticResource Caption}"
                    >
                    <TextBlock.Text>
                        <MultiBinding
                            StringFormat="{}{0:dd.MM.yy} - {1:dd.MM.yy}"
                            >
                            <Binding
                                Path="MinDatum"
                                />
                            <Binding
                                Path="MaxDatum"
                                />
                        </MultiBinding>
                    </TextBlock.Text>
                </TextBlock>
                <TextBlock
                    Margin="0 5 0 0"
                    FontSize="{StaticResource Caption}"
                    Text="{Binding Path=Einträge, StringFormat={}Einträge: {0}}"
                    />
                <TextBlock
                    Margin="0 2 0 0"
                    FontSize="{StaticResource Caption}"
                    Text="{Binding Path=EinträgeImWerk, StringFormat={}davon im Werk: {0}}"
                    />
                <TextBlock
                    Margin="0 2 0 0"
                    FontSize="{StaticResource Caption}"
                    Text="{Binding Path=EinträgeMontageEingeteilt, StringFormat={}davon in Montage: {0}}"
                    />
            </StackPanel>
        </HierarchicalDataTemplate>
    </telerik:RadPanelBar.ItemTemplate>
</telerik:RadPanelBar>

But have problems with the SelectedItem. The days and weeks are different classes, because they contain different properties for example the week contains a List of days.
If I bind the SelectedItem to the 'selTag' and set a selTag in code nothing happens.

If I change the Selection in UI the property is updated, so this part works.
But if I select a week in UI my whole RadPanelBar gets a red border I don't understand where it comes from. Maybe because a week is a different class then a day and cant be updated because of that?

Is there a way to bind the SelectedItem poperty of a hierarchical RadPanelBar for the parent and chield levels seperately? Or some compleetely different solution?

I have uploaded my project here: https://www.dropbox.com/s/dxbaignaf8rxcx7/ReklamationsManagement.zip?dl=0

It will definitely not run because a sql connection and has some things in it I not longer use, but maybe you better understand my classes there.

Greetings

Benedikt

Benedikt
Top achievements
Rank 4
Iron
Iron
Iron
 answered on 08 Oct 2019
1 answer
240 views

Hi,

I would like to customise the default [+] button on my row details column, put another icon and adjust the size and colour.

How do I go about it?

Thank you so much!

Dimitar Dinev
Telerik team
 answered on 08 Oct 2019
5 answers
138 views

I'm using a custom data provider, and testing suggests that some override methods are being called excessively.

The test data consists of 1 data row divided into 3 columns.

If I don't handle any events, OnHeaderValueNeeded  gets called 3 times, as expected.

If I handle the CellDecorationsNeeded event, that event will be called 6 times for the same data, but OnHeaderValueNeeded is unaffected.

However, if I call FitColumnWidthToContent in the Loaded event, CellDecorationsNeeded will be called 18 times and OnHeaderValueNeeded will be called 9 times.

Calls to OnCellValueNeeded also increase from 3 to 9 when FitColumnWidthToContent is utilized.

Now perhaps I'm doing something wrong or I simply misunderstand, but of far greater concern is my override of ItemProperties, which gets called 18 times without calling FitColumnWidthToContent, and, rather oddly, 40 times when I do call FitColumnWidthToContent. This is of concern because I have some iterative code in the ItemProperties override.

Thoughts?

Wayne

 

 

Dilyan Traykov
Telerik team
 answered on 08 Oct 2019
6 answers
219 views

Hi

I'm currently fixed to version 2016_3_1024 of UI for WPF.

I'd like to build a protected set of assemblies using the batch build targetting .NET 4.0.

My computer has VS 2017 Community and I have installed the Windows 10 SDK and Windows 8.1 SDK.

If I try to build the Telerik assemblies using the Build_WPF40.Bat file I get errors:-

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2863,5): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed

I've tried setting the MSBUILD environment in the batch file to use Visual Studio's MSBUILD but that fails too.

AL.EXE is in the Windows 10 SDK folders.

Any suggestions how I can resolve this?

 

 

 

Martin Ivanov
Telerik team
 answered on 08 Oct 2019
1 answer
71 views

Hi,

Currently, the row details are shown when any cells in the row is selected. However, I would like to only show my row details only when cells in (eg column A &C) is selected and the row details are different when selecting cells in the same row (but in column A&C).

Thank you.

Dilyan Traykov
Telerik team
 answered on 08 Oct 2019
1 answer
121 views

Hi,

I'd like to position a Shape's text outside of the shape itself. Can this be accomplished in WPF? I found a similar issue in the WinForms forum but the solution is not applicable.

Martin Ivanov
Telerik team
 answered on 08 Oct 2019
1 answer
120 views

I've got a RadCartesianChart3D chart that looks and works great.   (You fine folks have helped me out with it quite a bit on some recent threads here).  I use the Chart3DCameraBehavior upon it to zoom and rotate.  Although that is great, I now have a customer request for my user to be able to have their mouse moves (or touch moves) pan the chart instead of rotating it.  How may I do this?

I was thinking that I could make this into some sort of mode, but the Chart3DCameraBehavior does not seem to have any facility for panning at all that I can.  Is there another behavior that might do this for me? 

I would not be averse to writing my own code to adjust some sort of TranslateTransform when in some specific "mode", but the problem is that if I were to do that to the whole chart, the axes would pan with the surface and that wouldn't help me at all.

 

-Joe

Martin Ivanov
Telerik team
 answered on 08 Oct 2019
3 answers
505 views

Hi,

We're including the NoXaml Telerik DLLs and the Office 2016 theme DLL in our application. We've merged the resources from the various DLLs, including the Themes/System.Windows.xaml resource, as described in Setting a Theme Using Implicit Styles. We've found that this affects the appearance of some non-Telerik controls, such as TextBox, PasswordBox and ScrollViewer. For example, sometimes there are extra borders and sometimes rounded corners are missing (see attached screenshot).

At the bottom of that same page is a short section called Does a Theme Affect All WPF Controls? that confirms that some native WPF controls are affected by Telerik themes. We would like to avoid this. Could you help by answering the following questions:

  • How exactly do Telerik themes affect the appearance of native WPF controls, and why? Is this expected?
  • What is the best way to avoid this? Setting a Theme on MS Controls says that if we want to style one of the affected WPF controls we should merge the System.Windows.xaml resource dictionary when defining our styles. Will this ensure that everything looks the same as it does without the Telerik theme?
  • We've tried removing just the Themes/System.Windows.xaml resource (while keeping the other Telerik resources) and this seems to fix the appearance of native WPF controls. Is this recommended? What side-effects might this have.

Thanks.

Martin Ivanov
Telerik team
 answered on 08 Oct 2019
2 answers
428 views

On my development, each navigationView Item will display a page which is defined by an User control. When user click items on left-hand side, corresponding page is displayed on right-hand side.

Now considering following case:

  • User is working on a page (let's call it GRID page) which shows a few grids and some input editors. User rearranges columns of a grid; user selects a few rows of a grid; user inputs some texts on editor
  • User clicks another NavigationView item to look for some information on another page;
  • User switches back to GRID page, and he will discover that all the changes he just made are gone. Every thing goes back to initial state.

Debugging told me that the user control of GRID page is re-created whe user switched back to GRID page

My questions:

  1. Instead of destroying/creating pages, is that a way to hide/show pages when use switch pages?
  2. If this is impossible, how can I perserve the status of a page so that user can go back and continue working on it.

Thanks.

zigzag
Top achievements
Rank 1
 answered on 07 Oct 2019
2 answers
155 views

I need to pass multiple values into the i value converter but since multibinding isn't an option for DataMemberBinding I decided to pass the whole type into the converter as seen below: (I tried to only put the relevent code here)

                <telerik:GridViewDataColumn Header="{x:Static properties:Resources.Value}" DataMemberBinding="{Binding Converter={StaticResource myConverterSelector}}" TextAlignment="Center" HeaderTextAlignment="Center"  DataType="{x:Type sys:Double}" UniqueName="Value">

 

        public class MyConverterSelector : IValueConverter
    {
        public object Convert(object item, Type targetType, object parameter,
            System.Globalization.CultureInfo culture)
        {
            TabularTag tag = item as TabularTag;
            if (tag != null)
            {
                if (tag.Format == "Float" || tag.Format.Contains("REAL") || tag.Format == "")
                {

                    double parsedVal;
                    if (Double.TryParse(tag.Value.ToString(), out parsedVal))
                    {
                        return parsedVal.ToString("f3", CultureInfo.InvariantCulture);
                    }
                }
                else
                {
                    double parsedVal;
                    if (Double.TryParse(tag.Value.ToString(), out parsedVal))
                        return parsedVal.ToString("f0", CultureInfo.InvariantCulture);
                }
            }
            return null;
        }

        public object ConvertBack(object item, Type targetType,
            object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }

 

This works great on the cell data but the filter for this column ends up empty (I attached a snapshot of this) I tried using CellTemplate instead to edit the data but this doesn't affect the filter, which needs to match.

Jessica
Top achievements
Rank 1
 answered on 07 Oct 2019
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?