We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4e0ae3 commit 093c4b2Copy full SHA for 093c4b2
2 files changed
components/Segmented/src/Segmented/Segmented.cs
@@ -160,11 +160,10 @@ private void OnOrientationChanged()
160
{
161
for (int i = 0; i < Items.Count; i++)
162
163
- var container = ContainerFromIndex(i) as SegmentedItem;
164
- if (container is null)
165
- continue;
166
-
167
- container.UpdateOrientation(Orientation);
+ if (ContainerFromIndex(i) is SegmentedItem item)
+ {
+ item.UpdateOrientation(Orientation);
+ }
168
}
169
170
components/Segmented/src/SegmentedItem/SegmentedItem.cs
@@ -2,8 +2,6 @@
2
// The .NET Foundation licenses this file to you under the MIT license.
3
// See the LICENSE file in the project root for more information.
4
5
-using Windows.Media.Devices;
6
7
namespace CommunityToolkit.WinUI.Controls;
8
9
/// <summary>
0 commit comments