-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from IeuanWalker/Fix/ButtonMoved
- Loading branch information
Showing
10 changed files
with
157 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage x:Class="App.ButtonNotInScrollViewPage" | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:stateButton="clr-namespace:StateButton;assembly=StateButton"> | ||
<ContentPage.Content> | ||
<StackLayout Padding="20"> | ||
<stateButton:StateButton AutomationProperties.IsInAccessibleTree="True" | ||
AutomationProperties.Name="Test" | ||
Clicked="StateButton_Clicked" | ||
HorizontalOptions="Center" | ||
Released="StateButton_Released"> | ||
<stateButton:StateButton.Content> | ||
<Frame Padding="20,10" BackgroundColor="Red"> | ||
<Frame.Triggers> | ||
<DataTrigger Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}" | ||
TargetType="Frame" | ||
Value="Pressed"> | ||
<Setter Property="BackgroundColor" Value="LightGray" /> | ||
</DataTrigger> | ||
</Frame.Triggers> | ||
<Label Text="Test" TextColor="White"> | ||
<Label.Triggers> | ||
<DataTrigger Binding="{Binding Source={RelativeSource AncestorType={x:Type stateButton:StateButton}}, Path=State}" | ||
TargetType="Label" | ||
Value="Pressed"> | ||
<Setter Property="TextColor" Value="Blue" /> | ||
</DataTrigger> | ||
</Label.Triggers> | ||
</Label> | ||
</Frame> | ||
</stateButton:StateButton.Content> | ||
</stateButton:StateButton> | ||
</StackLayout> | ||
</ContentPage.Content> | ||
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using Xamarin.Forms; | ||
using Xamarin.Forms.Xaml; | ||
|
||
namespace App | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
public partial class ButtonNotInScrollViewPage : ContentPage | ||
{ | ||
public ButtonNotInScrollViewPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private async void StateButton_Clicked(object sender, EventArgs e) | ||
{ | ||
await DisplayAlert("Clicked", string.Empty, "OK"); | ||
} | ||
|
||
private async void StateButton_Released(object sender, EventArgs e) | ||
{ | ||
await DisplayAlert("Release", string.Empty, "OK"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"AttributesTolerance": 2, | ||
"KeepFirstAttributeOnSameLine": true, | ||
"MaxAttributeCharactersPerLine": 0, | ||
"MaxAttributesPerLine": 1, | ||
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransfom, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter", | ||
"SeparateByGroups": false, | ||
"AttributeIndentation": 0, | ||
"AttributeIndentationStyle": 1, | ||
"RemoveDesignTimeReferences": false, | ||
"EnableAttributeReordering": true, | ||
"AttributeOrderingRuleGroups": [ | ||
"x:Class", | ||
"xmlns, xmlns:x", | ||
"xmlns:*", | ||
"x:Key, Key, x:Name, Name, x:Uid, Uid, Title", | ||
"Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom", | ||
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight", | ||
"Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex", | ||
"*:*, *", | ||
"PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint", | ||
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText", | ||
"Storyboard.*, From, To, Duration" | ||
], | ||
"FirstLineAttributes": "", | ||
"OrderAttributesByName": true, | ||
"PutEndingBracketOnNewLine": false, | ||
"RemoveEndingTagOfEmptyElement": true, | ||
"SpaceBeforeClosingSlash": true, | ||
"RootElementLineBreakRule": 0, | ||
"ReorderVSM": 2, | ||
"ReorderGridChildren": false, | ||
"ReorderCanvasChildren": false, | ||
"ReorderSetters": 0, | ||
"FormatMarkupExtension": true, | ||
"NoNewLineMarkupExtensions": "x:Bind, Binding", | ||
"ThicknessSeparator": 2, | ||
"ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", | ||
"FormatOnSave": true, | ||
"CommentPadding": 1 | ||
} |