Sidebar Wizard with External Pages

Wizard for WPF Forum

Posted 13 years ago by Doug Beck
I am looking to create a sidebar wizard with welcome and completion pages. I don't want either of these pages to show up in the sidebar. I tried making them of type "External" but they are still included. How do I exclude them?

Comments (1)

Posted 13 years ago by Doug Beck
I managed to figure it out based upon another post. I used a ListBox like this;

<ListBox Style="{StaticResource SidebarListBoxStyle}"
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedPage}">
<Style TargetType="ListBoxItem">
<Setter Property="Visibility">
<MultiBinding Converter="{x:Static local:CustomValueConverter.Instance}">
<Binding />
<Binding Path="Wizard.SelectedPage" />

And a converter like this;

public class CustomValueConverter : IMultiValueConverter

public readonly static CustomValueConverter Instance = new CustomValueConverter();

public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
if (values == null || values.Length < 1)
throw new ArgumentException("values");

WizardPage page = values[0] as WizardPage;
if (page != null && page.Wizard != null)
int index = page.Wizard.Items.IndexOf(page);

if (index == 0) return (Visibility.Collapsed);
if (index + 1 == page.Wizard.Items.Count) return (Visibility.Collapsed);

return Visibility.Visible;

public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
throw new NotImplementedException();
The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.