Skip to content

Commit 5daba6d

Browse files
committed
resolved conflicts
2 parents 19e67e0 + dc2049b commit 5daba6d

File tree

55 files changed

+14886
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+14886
-56
lines changed

maui/samples/Gallery/ControlList.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<Assembly Name="Calendar" />
2323
<Assembly Name="Accordion" />
2424
<Assembly Name="Cards" />
25+
<Assembly Name="Popup"/>
2526
</Assemblies>
2627
</SampleBrowser>
1.64 KB
Loading
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<SyncfusionControls>
3+
<ControlCategory Name="Layouts">
4+
<Control Title="Popup" ControlName="SfPopup" Image="popup.png" Description="Enables custom alert messages or loading specific views in a popup.">
5+
<Sample SearchTags="popup, pop, up, alert, dialogue, toast" SampleName="GettingStarted" Title="Getting Started" />
6+
</Control>
7+
</ControlCategory>
8+
</SyncfusionControls>

maui/samples/Gallery/Samples/Popup/GettingStarted/GettingStarted.xaml

Lines changed: 828 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Syncfusion.Maui.ControlsGallery.Popup.SfPopup
2+
{
3+
public partial class GettingStarted : SampleView
4+
{
5+
public GettingStarted()
6+
{
7+
InitializeComponent();
8+
}
9+
}
10+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
using Syncfusion.Maui.ControlsGallery;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Reflection;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
9+
namespace Syncfusion.Maui.ControlsGallery.Popup.SfPopup
10+
{
11+
public class SampleViewBehavior : Behavior<SampleView>
12+
{
13+
#region Private Fields
14+
15+
Syncfusion.Maui.Toolkit.Popup.SfPopup? _actionSheetPopup;
16+
17+
#endregion
18+
19+
#region Methods
20+
21+
internal static Size GetScaledScreenSize(DisplayInfo info)
22+
{
23+
return new Size(info.Width / info.Density, info.Height / info.Density);
24+
}
25+
protected override void OnAttachedTo(SampleView sampleView)
26+
{
27+
_actionSheetPopup = sampleView.Resources["Actionsheet"] as Syncfusion.Maui.Toolkit.Popup.SfPopup;
28+
29+
sampleView.SizeChanged += SampleView_SizeChanged;
30+
31+
base.OnAttachedTo(sampleView);
32+
}
33+
34+
protected override void OnDetachingFrom(SampleView sampleView)
35+
{
36+
// Unsubscribe from SizeChanged
37+
sampleView.SizeChanged -= SampleView_SizeChanged;
38+
_actionSheetPopup = null;
39+
}
40+
41+
void SampleView_SizeChanged(object? sender, EventArgs e)
42+
{
43+
if (sender is SampleView sampleView)
44+
{
45+
var displayInfo = DeviceDisplay.Current.MainDisplayInfo;
46+
var screenWidth = GetScaledScreenSize(displayInfo).Width;
47+
var screenHeight = GetScaledScreenSize(displayInfo).Height;
48+
49+
#if ANDROID || IOS
50+
if (DeviceDisplay.Current.MainDisplayInfo.Orientation == DisplayOrientation.Portrait)
51+
{
52+
_actionSheetPopup!.WidthRequest = screenWidth;
53+
}
54+
else
55+
{
56+
_actionSheetPopup!.WidthRequest = 360;
57+
}
58+
59+
_actionSheetPopup!.StartY = (int)(screenHeight - _actionSheetPopup!.HeightRequest);
60+
#else
61+
_actionSheetPopup!.WidthRequest = 360;
62+
#endif
63+
#if IOS || MACCATALYST
64+
_actionSheetPopup.Refresh();
65+
#endif
66+
}
67+
}
68+
}
69+
70+
#endregion
71+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using Syncfusion.Maui.Toolkit.EffectsView;
2+
using Syncfusion.Maui.Toolkit.Internals;
3+
using PointerEventArgs = Syncfusion.Maui.Toolkit.Internals.PointerEventArgs;
4+
5+
namespace Syncfusion.Maui.ControlsGallery.Popup.SfPopup
6+
{
7+
internal class SfEffectsViewAdv : SfEffectsView, ITouchListener
8+
{
9+
10+
#region Constructor
11+
12+
public SfEffectsViewAdv()
13+
{
14+
15+
}
16+
17+
#endregion
18+
19+
#region Methods
20+
public new void OnTouch(PointerEventArgs e)
21+
{
22+
#if ANDROID
23+
{
24+
return;
25+
}
26+
#else
27+
28+
if (e.Action == PointerActions.Entered)
29+
{
30+
ApplyEffects(SfEffects.Highlight, RippleStartPosition.Default, new System.Drawing.Point((int)e.TouchPoint.X, (int)e.TouchPoint.Y), false);
31+
}
32+
else if (e.Action == PointerActions.Pressed)
33+
{
34+
ApplyEffects(SfEffects.Ripple, RippleStartPosition.Default, new System.Drawing.Point((int)e.TouchPoint.X, (int)e.TouchPoint.Y), false);
35+
}
36+
else if (e.Action == PointerActions.Released || e.Action == PointerActions.Cancelled || e.Action == PointerActions.Exited)
37+
{
38+
Reset();
39+
}
40+
#endif
41+
}
42+
43+
#endregion
44+
}
45+
}
Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.ComponentModel.DataAnnotations;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
9+
namespace Syncfusion.Maui.ControlsGallery.Popup.SfPopup
10+
{
11+
public class SimpleModel : INotifyPropertyChanged
12+
{
13+
#region Fields
14+
15+
string? _userName;
16+
string? _mailId;
17+
string? _image;
18+
bool _isSelected;
19+
20+
#endregion
21+
22+
#region Properties
23+
24+
public string? UserName
25+
{
26+
get { return _userName; }
27+
set
28+
{
29+
if (value is not null)
30+
{
31+
_userName = value;
32+
OnPropertyChanged("UserName");
33+
}
34+
}
35+
}
36+
37+
public string? MailId
38+
{
39+
get { return _mailId; }
40+
set
41+
{
42+
if (value is not null)
43+
{
44+
_mailId = value;
45+
OnPropertyChanged("MailId");
46+
}
47+
}
48+
}
49+
50+
public string? Image
51+
{
52+
get { return _image; }
53+
set
54+
{
55+
if (value is not null)
56+
{
57+
_image = value;
58+
OnPropertyChanged("Image");
59+
}
60+
}
61+
}
62+
63+
public bool IsSelected
64+
{
65+
get { return _isSelected; }
66+
set
67+
{
68+
_isSelected = value;
69+
OnPropertyChanged("IsSelected");
70+
}
71+
}
72+
73+
#endregion
74+
75+
#region Constructor
76+
77+
public SimpleModel()
78+
{
79+
80+
}
81+
82+
#endregion
83+
84+
#region Interface Member
85+
86+
public event PropertyChangedEventHandler? PropertyChanged;
87+
88+
public void OnPropertyChanged(string name)
89+
{
90+
if (PropertyChanged is not null)
91+
{
92+
PropertyChanged(this, new PropertyChangedEventArgs(name));
93+
}
94+
}
95+
96+
#endregion
97+
}
98+
99+
public class ConfirmationModel : INotifyPropertyChanged
100+
{
101+
#region Fields
102+
103+
string? _ringtone;
104+
bool _selectedRingtone;
105+
106+
#endregion
107+
108+
#region Properties
109+
110+
public string? Ringtone
111+
{
112+
get { return _ringtone; }
113+
set
114+
{
115+
if (value is not null)
116+
{
117+
_ringtone = value;
118+
OnPropertyChanged("Ringtone");
119+
}
120+
}
121+
}
122+
123+
public bool SelectedRingtone
124+
{
125+
get { return _selectedRingtone; }
126+
set
127+
{
128+
_selectedRingtone = value;
129+
OnPropertyChanged("SelectedRingtone");
130+
}
131+
}
132+
133+
#endregion
134+
135+
#region Constructor
136+
137+
public ConfirmationModel()
138+
{
139+
140+
}
141+
#endregion
142+
143+
#region Interface Member
144+
145+
public event PropertyChangedEventHandler? PropertyChanged;
146+
147+
public void OnPropertyChanged(string name)
148+
{
149+
if (PropertyChanged is not null)
150+
{
151+
PropertyChanged(this, new PropertyChangedEventArgs(name));
152+
}
153+
}
154+
155+
#endregion
156+
}
157+
158+
public class FullScreenModel : INotifyPropertyChanged
159+
{
160+
#region Fields
161+
string? _userName;
162+
string? _email;
163+
string? _password;
164+
string? _rePassword;
165+
#endregion
166+
167+
#region Properties
168+
[Display(Prompt = "Pick your username")]
169+
public string? UserName
170+
{
171+
get { return _userName; }
172+
set
173+
{
174+
if (value is not null)
175+
{
176+
_userName = value;
177+
OnPropertyChanged("UserName");
178+
}
179+
}
180+
}
181+
182+
[Display(Prompt = "Enter your email address")]
183+
public string? Email
184+
{
185+
get { return _email; }
186+
set
187+
{
188+
if (value is not null)
189+
{
190+
_email = value;
191+
OnPropertyChanged("Email");
192+
}
193+
}
194+
}
195+
196+
[Display(Prompt = "Enter your password", Name = "Password")]
197+
[DataType(DataType.Password)]
198+
public string? Password
199+
{
200+
get { return _password; }
201+
set
202+
{
203+
if (value is not null)
204+
{
205+
_password = value;
206+
OnPropertyChanged("Password");
207+
}
208+
}
209+
}
210+
211+
[Display(Prompt = "Re-enter your password", Name = "RePassword")]
212+
[DataType(DataType.Password)]
213+
public string? RePassword
214+
{
215+
get { return _rePassword; }
216+
set
217+
{
218+
if (value is not null)
219+
{
220+
_rePassword = value;
221+
OnPropertyChanged("RePassword");
222+
}
223+
}
224+
}
225+
#endregion
226+
227+
#region Constructor
228+
public FullScreenModel()
229+
{
230+
UserName = string.Empty;
231+
Email = string.Empty;
232+
Password = string.Empty;
233+
RePassword = string.Empty;
234+
}
235+
#endregion
236+
237+
#region Interface Member
238+
public event PropertyChangedEventHandler? PropertyChanged;
239+
public void OnPropertyChanged(string name)
240+
{
241+
if (PropertyChanged is not null)
242+
{
243+
PropertyChanged(this, new PropertyChangedEventArgs(name));
244+
}
245+
}
246+
#endregion
247+
}
248+
}

0 commit comments

Comments
 (0)