Telerik Forums
UI for WPF Forum
1 answer
127 views
Hi,

Is it possible to hide or show a field (table, span etc) based on a mergefield value.

Similar to the feature available in Microsoft Word.

I.e. (setting an expression)

If mergefield.invoiced == true then fieldname.show else fieldname.hide

Thanks, 

Rob
Boby
Telerik team
 answered on 12 Nov 2013
5 answers
554 views
Hi Telerick,

I am testing telerik for PRISM + Unity. 
All of control is beyond my expectation and working great.

However, I experienced one major issue when using RegionManager.RequestNavigate after closing RadPane.
When caller navigates with bookId, there is no issue when the book id is new. The new view is created and activated well.
But I met two issue when the book id exits on list of view.
First, The existing view is not activated after RegionManager.RequestNavigate 
Second, I closed the one book view and called RegionManager.RequestNavigate  with the book id. In this time, Not thing happens.
The old view looks like alive in the view list....

I am using RadPaneGroupRegionAdapter which comes from your blog
And I tried to DockingExtension on forum but showing same issues.
I spend almost two weeks in order solve this issue but I can't get any clue... 

1. ------------- caller ---------------
query.Add("BookId", book.Id.ToString());

RegionManager.RequestNavigate( RegionName.MainContent, new Uri("BookView" + query.ToString(), UriKind.Relative), NavigationComplted);

2. -------    BookViewModel
public bool IsNavigationTarget(NavigationContext navigationContext)
{
UriQuery query = navigationContext.Parameters;
int bookId = Convert.ToInt32(query["BookId"]);

if (this.BookId == bookId)
return true;

return false;
}


3. --- RegionAdapter comes from your blog

public class RadPaneGroupRegionAdapter : RegionAdapterBase<RadPaneGroup>
    {
        public RadPaneGroupRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory)
            : base(regionBehaviorFactory)
        {
 
        }
 
        protected override void AttachBehaviors(IRegion region, RadPaneGroup regionTarget)
        {
            base.AttachBehaviors(region, regionTarget);
        }
 
        
 
        protected override void Adapt(IRegion region, RadPaneGroup regionTarget)
        {
            
            region.Views.CollectionChanged += (s, e) =>
            {
                switch (e.Action)
                {
                    case NotifyCollectionChangedAction.Add:
                        foreach (var item in e.NewItems.OfType<RadPane>())
                        {
                            regionTarget.Items.Add(item);
                        }
                        break;
                    case NotifyCollectionChangedAction.Remove:
                        foreach (var item in e.OldItems.OfType<RadPane>())
                        {
                            //regionTarget.Items.Remove(item);
                            item.RemoveFromParent();
                        }
                        break;
                    case NotifyCollectionChangedAction.Replace:
                        var oldItems = e.OldItems.OfType<RadPane>();
                        var newItems = e.NewItems.OfType<RadPane>();
                        var newItemsEnumerator = newItems.GetEnumerator();
                        foreach (var oldItem in oldItems)
                        {
                            var parent = oldItem.Parent as ItemsControl;
                            if (parent != null && parent.Items.Contains(oldItem))
                            {
                                parent.Items[parent.Items.IndexOf(oldItem)] = newItemsEnumerator.Current;
                                if (!newItemsEnumerator.MoveNext())
                                {
                                    break;
                                }
                            }
                            else
                            {
                                oldItem.RemoveFromParent();
                                regionTarget.Items.Add(newItemsEnumerator.Current);
                            }
                        }
                        break;
                    case NotifyCollectionChangedAction.Reset:
                        regionTarget
                            .EnumeratePanes()
                            .ToList()
                            .ForEach(p => p.RemoveFromParent());
 
                        foreach (var view in region.Views)
                        {
                            regionTarget.Items.Add(view);
                        }
 
                        break;
                    default:
                        break;
                }
            };
 
            foreach (var view in region.Views.OfType<RadPane>())
            {
                regionTarget.Items.Add(view);
            }
        }
 
        protected override IRegion CreateRegion()
        {
            return new AllActiveRegion();
        }
    }


4. -- Docking Extension

   public class DockingExtensions
    {
        public static bool GetRemovePanesWhenClosed(DependencyObject obj)
        {
            return (bool)obj.GetValue(RemovePanesWhenClosedProperty);
        }
 
        public static void SetRemovePanesWhenClosed(DependencyObject obj, bool value)
        {
            obj.SetValue(RemovePanesWhenClosedProperty, value);
        }
 
        public static readonly DependencyProperty RemovePanesWhenClosedProperty =
            DependencyProperty.RegisterAttached("RemovePanesWhenClosed"typeof(bool), typeof(DockingExtensions), new PropertyMetadata(false, OnRemovePanesWhenClosedPropertyChanged));
 
        private static void OnRemovePanesWhenClosedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var newValue = (bool)e.NewValue;
            var dock = d as RadDocking;
 
            if (dock != null)
            {
                if (newValue)
                {
                    dock.PreviewClose += dock_PreviewClose;
                }
                else
                {
                    dock.PreviewClose -= dock_PreviewClose;
                }
            }
        }
 
        private static void dock_PreviewClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)
        {
            foreach (var pane in e.Panes)
            {
                DependencyObject o = pane.Parent;
 
 
                pane.RemoveFromParent();
                pane.Content = null;
                pane.Header = null;
                pane.DataContext = null;
            }
            e.Handled = true;
        }
    }
George
Telerik team
 answered on 11 Nov 2013
1 answer
138 views
Hi Telerik Support,

I want to dynamically change the Foreground Color of the tabheader. (i.e)When I drag and drop a new tab in the Main Window, The tabHeader Foreground Color have to change. How to achieve this? I am using Q2 version in my Application.

Thanks,
Vinnarasi
Kalin
Telerik team
 answered on 11 Nov 2013
3 answers
166 views
Hello,
I'm defining custom filters that inherits from existing filters. In Silverlight, I have no problem with this, but in WPF, the custom filters doesn't show all the options the first time it is displayed.

For example, if I define my custom filter as:
Namespace OrdinaSoft.Windows.Controls;
 
Interface
 
  Uses
    System.Windows,
 
    Telerik.Windows.Controls,
    Telerik.Windows.Controls.GridView,
    Telerik.Windows.Data;
 
  Type
    FilteringControl Nested In osRadGridViewTextColumn = Private Sealed Class (
      Telerik.Windows.Controls.GridView.FilteringControl
    )
 
    Public
 
      Constructor;
 
      Method Prepare (Column : GridViewColumn); Override;
 
    End;
 
Implementation
 
  Constructor osRadGridViewTextColumn.FilteringControl;
  Begin
    Style := System.Windows.Style (Application.Current.Resources ['FilteringControlStyle'])
  End;
 
  Method osRadGridViewTextColumn.FilteringControl.Prepare (
    Column : GridViewColumn
  );
  Begin
    Inherited Prepare (Column);
  End;
 
 
End.

Actually, this filter does nothing, it just inherits from the Telerik one.
Now, when I click on the funnel, the first time, the filter only displays the combo boxes, as you can see in the enclosed screen shot.
The second time the filter is displayed, it contains all the items.

Patrick
Yoan
Telerik team
 answered on 11 Nov 2013
13 answers
858 views
Hello everybody,

After migration to new Telerik Controls 2013 Q2 I've faced with some issues in grid view validating.

All items which bound to RadGridView have two validation attributes: Require from System.ComponentModel and my own attribute which inherited from ValidationAttribute.
WIth new Telerik assemblies it is incorrect row highlighting after validation was finished. Row is valid actually, but it has error message and error background (in attached screenshot). If you scroll grid up and down, than background will become normal and error message will disappear.
In debugger when code in RowValidated handle row has IsValid=true, but row Errors collection have 1 error description.

I've attached sample project where this issue is reproduced.

Do you know any ways to workaround this issue?
Thanks!
Vera
Telerik team
 answered on 11 Nov 2013
5 answers
227 views
Hi,

We are using the RadGridView in our project and we have also made use of the lightweight templates to try and improve the slow load times of the grid. However, after implementing the lightweight templates we appear to have lost the gridlines. Is there anyway to get the gridlines back when using the templates?

Thanks
Vanya Pavlova
Telerik team
 answered on 11 Nov 2013
1 answer
143 views
I have attached two pictures to demonstrate the issue.

The grid lines represent 1 minute intervals.

The first image shows the appointment being sized or dragged and it displays the start time and end time (2 to 3 minutes)

The second image shows the result when the appointment appears on the timeline.
Notice it is not aligned with the grid lines (should be between tick marks 2 and 3), I am not sure how to solve this offset problem..

Any help would be appreciated.
Rosi
Telerik team
 answered on 11 Nov 2013
5 answers
160 views
Hello,

I have a RadComboBox (from the Q3/2013 release) with say 10 items and I am using the Windows8TouchTheme. On my win8.1 tablet the scrolling of the dropdown list is very (very, very) slow, when I swipe over the items. First nothing happens, then it scrolls a few items down or up. When I swipe over the scrollbar the performance is normal as expected.

Any ideas?

Erik
Alek
Telerik team
 answered on 11 Nov 2013
4 answers
207 views
I need to position all child of  RadTileList to the center, I already try with HorizontalContentAlignment and set it to Center the content (i mean the child) still positioned on the left, why is that happen
Vanya Pavlova
Telerik team
 answered on 11 Nov 2013
3 answers
184 views
Hello, i have a problem with background color of RadTabControl.
My project is using WPF. I have used RadTabControl and have some Tabs. For example i have a tab with a Grid. In the Grid i have some RadTextBox, RadComboBox  and RadExpander. When i change the theme to Expression_Black in runtime, the themes of RadTextBox and RadComboBox will be changed automatically. But the Background colors of RadExpander and TabItems will not be changed.
Do i need to do something special for TabItems and RadExpander?
Thanks!
Ivan
Top achievements
Rank 1
 answered on 11 Nov 2013
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
Rating
SplashScreen
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?