Skip to content

Conversation

@jumulr
Copy link
Contributor

@jumulr jumulr commented Nov 19, 2016

Refresh navigation buttons' visibility when control's orientation changes.
Handle navigation buttons' visibility when toggling their display.
Apply transition when SelectedIndex changes.

Copy link
Member

@punker76 punker76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for fixing this. Can you look at my 2 comments?

return CoerceSelectedIndexProperty(d, value);
}
});
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add more documentation what this code does?

Minimum="1"
Maximum="{Binding Path=Items.Count, Mode=OneWay}"
Value="{Binding Path=SelectedIndex, Mode=TwoWay, Converter={vc:Int32IndexToNumberConverter}}"/>
<TextBlock VerticalAlignment="Center" Margin="8 0 0 0">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not starting from 0? Then you don't need the Int32IndexToNumberConverter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right.
It's just that users tend to prefer message 'Viewing item 1 on 2' than 'Viewing item 0 on 1'.
Hence the shift of 1.

@jumulr
Copy link
Contributor Author

jumulr commented Nov 19, 2016

Here you are, i added a detail explanation of the coercion trick.
As i am totally new to GitHub, feel free to instruct me on the workflow in case i did a mistake.

@jumulr jumulr closed this Nov 19, 2016
@punker76
Copy link
Member

@jumulr why closed?

@jumulr jumulr reopened this Nov 19, 2016
@jumulr
Copy link
Contributor Author

jumulr commented Nov 19, 2016

Mistake, sorry. Is that ok ?

@punker76 punker76 merged commit 8e0a7db into MahApps:develop Nov 22, 2016
@punker76 punker76 added this to the 1.4.0 milestone Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants